This needs to be the real OS size determined at runtime since that's the granularity with which the memory can be committed. For example, the ARM64 Linux distros have varying page size.  The same is true for all other places below where you have replaced the g_SystemInfo.dwPageSize with OS_PAGE_SIZE.