I’m writing a diagnostic app which needs to log what the user has set as his user-mode space a.k.a. user-mode virtual address space
a.k.a. the /3GB switch in WinXP or the increaseuserva switch in bcdedit on Vista/Win7.
Either of C++ or C++/CLI will do.
Any ideas ?
GlobalMemoryStatusEx will give you a MEMORYSTATUSEX struct with
ullTotalVirtual:Note that you’d have to mark your EXE as LARGEADDRESSAWARE in order to see 3GB in your process.
I think there’s another function that also returns this info (no – not GlobalMemoryStatus which is deprecated) along with processor info – but I can’t recall it ATM.