diff options
author | Mike Hommey <mh@glandium.org> | 2012-03-26 15:46:57 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2012-03-26 19:43:05 (GMT) |
commit | 5c89c50d1803dc0fb6544c1abd40552e76c8614d (patch) | |
tree | cbefee9d0a204796a164941298bc400aac9ff52c /src | |
parent | c1e567bda042d94159026b96e7a77683606037fa (diff) | |
download | jemalloc-5c89c50d1803dc0fb6544c1abd40552e76c8614d.zip jemalloc-5c89c50d1803dc0fb6544c1abd40552e76c8614d.tar.gz jemalloc-5c89c50d1803dc0fb6544c1abd40552e76c8614d.tar.bz2 |
Fix glibc hooks when using both --with-jemalloc-prefix and --with-mangling
Diffstat (limited to 'src')
-rw-r--r-- | src/jemalloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c index 3e168fd..d08e103 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -1181,7 +1181,15 @@ je_valloc(size_t size) } #endif -#if (!defined(JEMALLOC_PREFIX) && defined(__GLIBC__) && !defined(__UCLIBC__)) +/* + * is_malloc(je_malloc) is some macro magic to detect if jemalloc_defs.h has + * #define je_malloc malloc + */ +#define malloc_is_malloc 1 +#define is_malloc_(a) malloc_is_ ## a +#define is_malloc(a) is_malloc_(a) + +#if ((is_malloc(je_malloc) == 1) && defined(__GLIBC__) && !defined(__UCLIBC__)) /* * glibc provides the RTLD_DEEPBIND flag for dlopen which can make it possible * to inconsistently reference libc's malloc(3)-compatible functions |