Re: massif & counts per type

Philippe Waroquiers <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
On Thu, 2020-09-10 at 15:26 +0200, folkert wrote:
> Hi,
> 
> How can I obtain the number of mallocs per type in a time-frame using
> massif? I'm NOT interested in the total in use, I would like to know how
> often type x is allocated between t+1 and t+2.
You could run your application under valgrind + gdb/vgdb.
You can then put breakpoints at relevant places to trigger them at
t+1 and t+2.

You can then e.g. run with memcheck and have delta malloc info
being reported, using the memcheck monitor command leak_check.
This command can show the delta "alloc/free" since the previous
call.

Philippe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.