Reputation: 13298
my program is running and creating variables, I need to know what's the total of Bytes these variables take.
I don't want to know how much is the physical memory space that the system gives my program to be executed, I know I can open the processes manager and find out. I neither want to write into my code some sizeof and agregations so I can know the total size of the variable pool (let say the code is too complex to be modify like that). Finally I'm using Microsoft VC++ 2010 Express, I just want to know if there is a workspace which monitor that kind of information.
Thanks in advance.
Upvotes: 2
Views: 1598
Reputation: 440
Valgrind Massif profiler is a great tool (see here ) but only for Unix/Linux I think. In your case, on Windows I think Insure++ or softwareverify are good choices (they are commercial tools).
A free alternative is Google's tcmalloc which provides a heap profiler here
Upvotes: 0
Reputation: 69734
Check this out: Memory Performance Information . There are few metrics of a running process you might be interested in, you will primarily want private bytes
, and this data is available both programmatically or through tools like Performance Monitor
. You can also enumerate heaps of the process with GetProcessHeaps
(and even HeapWalk
if you need details) and check heap allocation sizes directly.
Upvotes: 4