This commit is contained in:
Бранимир Караџић
2025-01-26 15:19:24 -08:00
parent 2a03cec5d6
commit b6f79884e3

View File

@@ -442,13 +442,15 @@ namespace bx
size_t memoryPageSize() size_t memoryPageSize()
{ {
size_t pageSize; size_t pageSize;
#if BX_PLATFORM_WINDOWS #if BX_PLATFORM_LINUX || BX_PLATFORM_OSX
SYSTEM_INFO si; //SystemInfo si; pageSize = sysconf(_SC_PAGESIZE);
#elif BX_PLATFORM_WINDOWS
SYSTEM_INFO si;
memSet(&si, 0, sizeof(si) ); memSet(&si, 0, sizeof(si) );
::GetSystemInfo(&si); ::GetSystemInfo(&si);
pageSize = si.dwAllocationGranularity; pageSize = si.dwAllocationGranularity;
#else #else
pageSize = sysconf(_SC_PAGESIZE); pageSize = 16<<10;
#endif // BX_PLATFORM_WINDOWS #endif // BX_PLATFORM_WINDOWS
return pageSize; return pageSize;