Custom malloc/mmap for x86_64
Mike Frysinger
vapier@gentoo.org
Sat Apr 28 22:03:00 GMT 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20120428/2e8e6728/attachment.sig>
More information about the Libc-help
mailing list