I am writing a native C++ code that takes up a lot of memory. Is there a tool or a method to monitor where my memory is getting allocated? I am looking for something like a profiler that tells me which functions take up most of memory.
An alternative method that would be very helpful would be to step through the code and look at some good memory monitoring program/function that would tell me how much memory I allocated as I step through my higher level routines.
Any pointers would be appreciated.
PS: I am using Visual Studio 2005 on Windows 2000 Professional.
We have Rational Purify with us but my problem is not a memory leak.
My application just takes up too much memory.. I just want to know which functions or portions of my code are allocating all the memory that is in use when the program is running. So I can change my strategy there and maybe compute some values instead of storing them.
I don't know if Purify can act like a memory profiler also. I will check though.
AQTime looked useful, but we couldn't give it a fair shot to come to a decision in a month (trial period). It gives details of which objects are taking up how much memory, but didn't really help us identify how best to minimize our memory usage. We were expecting something on the lines of Rational quantify analysis and AQTime really falls short of that.
In the end what we did was to go through all our classes and count the number of bytes we are allocating per object and then run some cases to determine the number of objects of each class and just summed them together. I know this is quite primitive and painful, but still gives a rough estimate.