debugging mallocs and per-thread tcache

Tom Horsley horsley1953@gmail.com
Thu Nov 30 23:49:00 GMT 2017


On Thu, 30 Nov 2017 15:27:11 -0800
Carlos O'Donell wrote:

> All that the debugging malloc cares about in most cases is tracking
> it's own API calls and ensuring you followed the allocation rules.

I should have said. This debug malloc basically does nothing
but bookkeeping about the allocated block. It intercepts the
public entry points to do the data gathering, then calls the
original malloc routines.

This way the behaviour of the program being debugged is as
near identical as I can get it to the non-debugged program,
but I can find things like the walkback for where blocks
were allocated or freed (as one example of the useful data
I can gather).



More information about the Libc-help mailing list