So I use Process.GetProcesses()
(from System.Diagnostics) to get all of my processes. I then try to sum up the total memory of each process to compare it to what Windows Task Manager is reporting in the 'Physical Memory Usage History' section of the Performance tab. I've tried all the memory types available and none add up. I expected it to be working set, but that still leaves about a 1GB gap.
So does GetProcesses
not return all of the processes, is there a different way to use the Process
class to get the actual memory as reported by Task Manager on the Performance tab, or is the Process
class unable to be used to get the same memory usage report?
(I've seen How to calculate memory usage as Task Manager does?, but I'm looking to do it with the Process
class.)