Get the maximum addressable memory space on a Win32 system

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."

Upvotes: 2

Views: 515

Answers (1)

Mark Tolonen
Mark Tolonen

Reputation: 178224

Do either of those satisfy your requirement?

Upvotes: 2

Related Questions