My application is document based and memory usage per document is quite high in certain scenarios. I want to keep check on memory usage and show a warning to user to close some documents when available memory is about to go out.
What’s the best way to do it?
I ended up using
System.Diagnostics.Process.VirtualMemorySize64. I don’t know if it’s the best or the most accurate way to do it but it is serving my purpose.