Add page allocation utility functions
This commit is contained in:
@@ -316,6 +316,25 @@ public:
|
||||
/// <param name="ptr">A pointer to the memory block to deallocate.</param>
|
||||
static void Free(void* ptr) = delete;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the OS's default page size that can be used with AllocatePages.
|
||||
/// </summary>
|
||||
static uint64 GetDefaultPageSize() = delete;
|
||||
|
||||
/// <summary>
|
||||
/// Allocates pages memory block.
|
||||
/// </summary>
|
||||
/// <param name="numPages">The number of pages to allocate.</param>
|
||||
/// <param name="pageSize">The size of single page. Use GetDefaultPageSize() or provide compatible, custom size.</param>
|
||||
/// <returns>The pointer to the allocated pages in memory.</returns>
|
||||
static void* AllocatePages(uint64 numPages, uint64 pageSize) = delete;
|
||||
|
||||
/// <summary>
|
||||
/// Frees allocated pages memory block.
|
||||
/// </summary>
|
||||
/// <param name="ptr">The pointer to the pages to deallocate.</param>
|
||||
static void FreePages(void* ptr) = delete;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user