C# Tutorials - Herong's Tutorial Examples - Version 3.30, by Dr. Herong Yang
Private/Virtual Memory and Working Set
This section describes 3 basic memory usage numbers of a running process: private memory, virtual memory and working set.
From the previous tutorial, we learned how to retrieve memory usage statics using methods and properties of the System.Diagnostics.Process class. Now let's try to understand first 3 memory usage numbers:
"Private Memory", returned by the "PrivateMemorySize64" property, representing the amount of RAM allocated privately to the process. In general, "Private memory" does not include any memory occupied by shared DLL files used by the process.
"Virtual Memory", returned by the "VirtualMemorySize64" property, representing the total virtual address space of the process.
"Working Set", returned by the "WorkingSet64" property, representing the portion of the "Virtual memory" that is currently resident in RAM and can be reference without a page fault.
Run the MemoryUsage.exe created from the previous example again, you will see:
Current process: System.Diagnostics.Process (MemoryUsage) Private Memory: 8744960 Virtual Memory: 89157632 Working Set: 5599232 Paged Memory: 8744960 Paged System Memory: 100228 Non-paged System Memory: 3988
Now we know how read those numbers:
Last update: 2010.
Table of Contents