As anyone who has watched the Mark Russovich talk "Mysteries of Memory Management Revealed" knows, the vmmap tool can show you things that count against your process limit (2GB on vanilla 32 bit windows) that few other tools seem to know about.
I would like to be able to programmatically monitor my real total memory size (the one that's germane to the process limit) so I can at least log what's going on when I approach the process limit. Is there any information publicly available on how vmmap does this?
... Also, why is this information so darn hard to get??
Things I know about that (AFAIK) don't quite give you the full picture:
- ::GetProcessMemoryInfo looks like it only returns info about private memory usage
- System.Diagnostics.Process.VirtualMemorySize64 returns a pretty large number that still doesn't quite match the total shown by vmmap -- in fact it doesn't match ANYTHING shown in vmmap :(