I record memory allocations using valgrind massif and use ms_print to create a document of snapshots that shows me which callstack holds how much memory currently, right?
I want to measure which callstacks have allocated most over the whole program run, that means deallocated memory should be taken into account when calculating the weight of a callstack.
Is this possible?
Regards
When a tool (such as memcheck, massif, ...) replaces the memory allocation functions (malloc, free, ...), then valgrind provides the option:
So, if you use --xtree-memory=full, you will get a file that you can visualise with kcachegrind. The resulting file details a.o. what is currently allocated, and what was allocated and then freed.
See http://www.valgrind.org/docs/manual/manual-core.html#manual-core.xtree for more details.