This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: debugging mallocs and per-thread tcache
- From: Tom Horsley <horsley1953 at gmail dot com>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: libc-help at sourceware dot org
- Date: Thu, 30 Nov 2017 18:49:20 -0500
- Subject: Re: debugging mallocs and per-thread tcache
- Authentication-results: sourceware.org; auth=none
- References: <20171130153242.1503c6f8@tomh> <ccce334c-4a33-9a9c-638d-c0ff054d9a00@redhat.com>
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).