[PATCH] Allow to use different prefixes for jemalloc-specific functions and libc functions

Jason Evans jasone at canonware.com
Wed Feb 29 16:15:37 PST 2012

On Feb 23, 2012, at 3:23 AM, Mike Hommey wrote:
> From: Mike Hommey <mh at glandium.org>
> In some cases, it can be interesting to use different prefixes for the
> "standard" libc malloc functions and for jemalloc specific functions. One such
> case is to use the "__wrap_" prefix on libc malloc functions (for use with ld's
> --wrap option) and no prefix or "je_" for jemalloc functions.
> In such cases, it can also me interesting not to exclude memalign and valloc,
> so this change also adds an option not to omit them when the prefix is set.

Do you have a practical use case that makes this a compelling feature?  I'm reluctant to hard-code the set of JEMALLOC_LIBC() functions to make distinct from JEMALLOC_P() functions, because it may vary by operating system.


More information about the jemalloc-discuss mailing list