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]

Re: Custom malloc/mmap for x86_64


so you just want to override the malloc implementation ?  glibc is specifically 
designed to allow that at runtime today.

if you create a shared library that exports these functions:
	malloc calloc realloc memalign free

you can use it with LD_PRELOAD and both glibc and your own code will use the 
custom allocator functions on the fly.  then to switch back to the stock glibc 
ones, unset LD_PRELOAD.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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