Add --with-mangling.

Add the --with-mangling configure option, which can be used to specify
name mangling on a per public symbol basis that takes precedence over
--with-jemalloc-prefix.

Expose the memalign() and valloc() overrides even if
--with-jemalloc-prefix is specified.  This change does no real harm, and
simplifies the code.
This commit is contained in:
Jason Evans
2012-03-01 17:19:20 -08:00
parent 166a745b39
commit 0a5489e37d
15 changed files with 265 additions and 176 deletions

View File

@@ -30,7 +30,7 @@
#include <pthread.h>
#include <math.h>
#define JEMALLOC_MANGLE
#define JEMALLOC_NO_DEMANGLE
#include "../jemalloc@install_suffix@.h"
#include "jemalloc/internal/private_namespace.h"
@@ -149,7 +149,7 @@ static const bool config_ivsalloc =
#include "jemalloc/internal/qr.h"
#include "jemalloc/internal/ql.h"
extern void (*JEMALLOC_P(malloc_message))(void *wcbopaque, const char *s);
extern void (*je_malloc_message)(void *wcbopaque, const char *s);
/*
* Define a custom assert() in order to reduce the chances of deadlock during
@@ -618,13 +618,13 @@ sa2u(size_t size, size_t alignment, size_t *run_size_p)
/*
* Wrapper around malloc_message() that avoids the need for
* JEMALLOC_P(malloc_message)(...) throughout the code.
* je_malloc_message(...) throughout the code.
*/
JEMALLOC_INLINE void
malloc_write(const char *s)
{
JEMALLOC_P(malloc_message)(NULL, s);
je_malloc_message(NULL, s);
}
/*