Memory
I wasnt sure were to post this, but here I go. I was wondering how I could watch my system memory in real time to see what programs effect what memory. Like if I were to start up Word and I would like to know what memory is effect by it.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Matthew CochranPosted Jan 25, 2008, 9:19 AM
or if you are working on developing CLR apps, memprofiler is worth the money: http://memprofiler.com/
Scott LyslePosted Jan 25, 2008, 3:31 AM
Well, I don't know about the real time part but you can watch your memory using a performance counter. You could set up a timer control with a 1000 msec interval to get an update on the available memory and display that.
Declare a class scoped variable:
private
System.Diagnostics.PerformanceCounter pcCpu;In form load, create an instance:
pcRam = new System.Diagnostics.PerformanceCounter("Memory", "Available MBytes");
And on the tick event, display the available memory:
txtRAM.Text = pcRam.NextValue() + " MB";