Monitoring application memory usage
-
Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!
-
Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!
See here before you get too far into this.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
-
See here before you get too far into this.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
Thanks David for the prompt reply. Unfortunately my question was not clear nor complete... :sigh: What I meant was that I need to verify that memory is cleaned after app is closed. So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.
-
Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!
Have you taken a look at Glowcode[^]? If that is lot of moolah then take a peek at Free Memory Profiler Tool for C++[^]
-
Thanks David for the prompt reply. Unfortunately my question was not clear nor complete... :sigh: What I meant was that I need to verify that memory is cleaned after app is closed. So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.
dushkin wrote:
What I meant was that I need to verify that memory is cleaned after app is closed.
It is, whether you want it to be or not.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
-
Thanks David for the prompt reply. Unfortunately my question was not clear nor complete... :sigh: What I meant was that I need to verify that memory is cleaned after app is closed. So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.
dushkin wrote:
What I meant was that I need to verify that memory is cleaned after app is closed.
So I'd like to check the system free memory before I started the app and after I closed it, and this way to know if all the allocated memory was cleared.Emphasizing the previous response - that is always true regardless of what your application does. When the application stops, except for some exotic resources, all resources are cleaned up. Memory (all of it) is released, files are closed, sockets are closed, UI specific resources are closed, etc, etc, etc.
-
Hi All, I would like to monitor my application memory usage when it runs outside the debugger (VS2008). How can I do it? The best I can think of is to use some kind of a windows port of SAR utility from Linux to see what was the system memory state before I launched the program and what was the system memory state after I closed the program. I am talking about an MFC GUI application. Thanks!
The application can monitor itself[^] if you want. Or you can activate Windows Performance Counters[^] for your application, and use Performance Monitor to monitor your application.