[lttng-dev] [PATCH lttng-ust] Add trace support for calloc and realloc.

Alexander Monakov amonakov at ispras.ru
Thu Aug 1 12:26:44 EDT 2013


Hi,

I can offer two more possible approaches:

1.  Use posix_memalign to obtain free()'able memory for calloc without dlsym.
Of course, when you want to override posix_memalign (and all of its synonyms)
as well, you're again in the same trap.

2.  Do not override malloc&co at all, but rather use malloc hooks (see "man
malloc_hooks").

Hope that helps,
Alexander



More information about the lttng-dev mailing list