Is there a way on Win32 systems to programmatically get the full size of the OS's addressable memory space, using the Win32 API (or any accessible DLL that would be installed on a >=XP system). I know about GetPerformanceInfo
and GlobalMemoryStatusEx
, but the former only seems to deal with physical memory, and the latter pertains to memory addressable by my program, not the OS; since my program must be x86 and might be run on an x64 system, there is no guarantee this will even be ballpark.
Note: I'd prefer, but don't need, an exact size. I just need a "really good guess."
GetPhysicallyInstalledSystemMemory
can get the physical limit.
GetNativeSystemInfo
can retrieve the highest user virtual address the system can access.
Do either of those satisfy your requirement?