This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

some question about malloc_hook


hi all:
When I check below manual, it shows we can use  __malloc_hook and
__realloc_hook debug programsthat use dynamic memory allocation.
http://www.gnu.org/software/libc/manual/pdf/libc.pdf

But when I copy the sample code and try to compile for running.
it say
malloc_hook.c:12:1: warning: ‘__malloc_hook’ is deprecated (declared
at /media/sdb2/toolchain/arm/gcc-linaro-arm-linux-gnueabihf-4.9-2014.08_linux/arm-linux-gnueabihf/libc/usr/include/malloc.h:153)
[-Wdeprecated-declarations]

if __malloc_hook and __realloc_hook are really deprecated,
is there similar methods we can use to hook malloc, realloc instead?

appreciate your kind help in advance,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]