mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 12:42:34 +01:00
Cleanup.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user