Remove GetDefaultPageSize

Duplicate. We already have the API for this: `Platform::GetCPUInfo().PageSize`.
This commit is contained in:
Damian Korczowski
2021-02-21 14:44:16 +01:00
parent 161e9bd373
commit 15028c60ba
5 changed files with 0 additions and 21 deletions

View File

@@ -316,11 +316,6 @@ 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>

View File

@@ -51,11 +51,6 @@ void UnixPlatform::Free(void* ptr)
}
}
uint64 Win32Platform::GetDefaultPageSize()
{
return 16;
}
void* Win32Platform::AllocatePages(uint64 numPages, uint64 pageSize)
{
const uint64 numBytes = numPages * pageSize;

View File

@@ -16,7 +16,6 @@ public:
// [PlatformBase]
static void* Allocate(uint64 size, uint64 alignment);
static void Free(void* ptr);
static uint64 GetDefaultPageSize();
static void* AllocatePages(uint64 numPages, uint64 pageSize);
static void FreePages(void* ptr);
static uint64 GetCurrentProcessId();

View File

@@ -298,15 +298,6 @@ void Win32Platform::AtomicStore(int64 volatile* dst, int64 value)
InterlockedExchange64(dst, value);
}
uint64 Win32Platform::GetDefaultPageSize()
{
SYSTEM_INFO systemInfo;
GetSystemInfo(&systemInfo);
// Return the page size obtained from system
return systemInfo.dwPageSize;
}
void* Win32Platform::AllocatePages(uint64 numPages, uint64 pageSize)
{
const uint64 numBytes = numPages * pageSize;

View File

@@ -43,7 +43,6 @@ public:
{
_aligned_free(ptr);
}
static uint64 GetDefaultPageSize();
static void* AllocatePages(uint64 numPages, uint64 pageSize);
static void FreePages(void* ptr);
static bool Is64BitPlatform();