>>>>> "Rich" == Rich Felker <dalias@aerifal.cx> writes:
Rich> Valgrind already does a great job with this kind of thing,
Rich> and gdb could do some similar work just by breakpointing malloc and
Rich> free and recording the calls.
It's already been done in gdb:
https://fedorahosted.org/gdb-heap/
Tom