Move default AllocatePages/FreePages impl from Unix to PlatformBase

This commit is contained in:
Wojtek Figat
2021-03-09 14:32:24 +01:00
parent cc201e198d
commit 48ae338fb2
4 changed files with 15 additions and 18 deletions

View File

@@ -163,6 +163,19 @@ void PlatformBase::Exit()
{
}
void* PlatformBase::AllocatePages(uint64 numPages, uint64 pageSize)
{
// Fallback to the default memory allocation
const uint64 numBytes = numPages * pageSize;
return Platform::Allocate(numBytes, pageSize);
}
void PlatformBase::FreePages(void* ptr)
{
// Fallback to free
Platform::Free(ptr);
}
PlatformType PlatformBase::GetPlatformType()
{
return PLATFORM_TYPE;