Hi-
I'm wondering if anyone has run across any program for C++ development
that will help track the memory usage of different objects (class
instances) within a program. I find it's easy enough on various
platforms to get a handle on the total memory usage of your program for
different testcases. But what I'm interested in is finding out where the
memory usage is going within the program (sort of like how profiling
tools tell you the function/line number where your run-time is going). A
hierarchical report listing each class, the number of instances created
of that class, and the same info for each sub-class would be ideal. I've
generated this kind of info on a limited basis in the past simply by
adding instrumentation to the destructors of classes. But now I'm
dealing with a s/w system that is large enough I don't look forward to
doing that by hand!
Thanks,
-dm
I'm wondering if anyone has run across any program for C++ development
that will help track the memory usage of different objects (class
instances) within a program. I find it's easy enough on various
platforms to get a handle on the total memory usage of your program for
different testcases. But what I'm interested in is finding out where the
memory usage is going within the program (sort of like how profiling
tools tell you the function/line number where your run-time is going). A
hierarchical report listing each class, the number of instances created
of that class, and the same info for each sub-class would be ideal. I've
generated this kind of info on a limited basis in the past simply by
adding instrumentation to the destructors of classes. But now I'm
dealing with a s/w system that is large enough I don't look forward to
doing that by hand!
Thanks,
-dm
Comment