private static int GetSystemPageAllocationGranularity() { Interop.Kernel32.SYSTEM_INFO info; Interop.Kernel32.GetSystemInfo(out info); return (int)info.dwAllocationGranularity; } }