Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Jan 26, 2025
1 parent 2a03cec commit b6f7988
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,15 @@ namespace bx
size_t memoryPageSize()
{
size_t pageSize;
#if BX_PLATFORM_WINDOWS
SYSTEM_INFO si; //SystemInfo si;
#if BX_PLATFORM_LINUX || BX_PLATFORM_OSX
pageSize = sysconf(_SC_PAGESIZE);
#elif BX_PLATFORM_WINDOWS
SYSTEM_INFO si;
memSet(&si, 0, sizeof(si) );
::GetSystemInfo(&si);
pageSize = si.dwAllocationGranularity;
#else
pageSize = sysconf(_SC_PAGESIZE);
pageSize = 16<<10;
#endif // BX_PLATFORM_WINDOWS

return pageSize;
Expand Down

0 comments on commit b6f7988

Please sign in to comment.