How to get memory available or used in C#

user34537 picture user34537 · Apr 15, 2009 · Viewed 167.7k times · Source

How can I get the available RAM or memory used by the application?

Answer

Jesper Fyhr Knudsen picture Jesper Fyhr Knudsen · Apr 15, 2009

You can use:

Process proc = Process.GetCurrentProcess();

To get the current process and use:

proc.PrivateMemorySize64;

To get the private memory usage. For more information look at this link.