I am using the GlobalMemoryStatusEx function to retrieve information about memory, but this function doesn\'t work correctly. It returns 0 for all properties. I
GlobalMemoryStatusEx
you can use this templates:
long memory = Process.GetCurrentProcess().PeakVirtualMemorySize64;
And another properties with names Peak*64