Fix name mangling for stress tests.

Fix stress tests such that testlib code uses the jet_ allocator, but
test code uses libjemalloc.

Generate jemalloc_{rename,mangle}.h, the former because it's needed for
the stress test name mangling fix, and the latter for consistency.  As
an artifact of this change, some (but not all) definitions related to
the experimental API are absent from the headers unless the feature is
enabled at configure time.
This commit is contained in:
Jason Evans
2014-01-16 17:38:01 -08:00
parent 4f37ef693e
commit f234dc51b9
13 changed files with 164 additions and 174 deletions

View File

@@ -71,6 +71,7 @@ typedef intptr_t ssize_t;
# include "jemalloc/internal/public_namespace.h"
# define JEMALLOC_NO_RENAME
# include "../jemalloc@install_suffix@.h"
# undef JEMALLOC_NO_RENAME
#else
# define JEMALLOC_N(n) @private_namespace@##n
# include "../jemalloc@install_suffix@.h"

View File

@@ -1,5 +1,6 @@
#!/bin/sh
for symbol in `cat $1` ; do
echo "#define je_${symbol} JEMALLOC_N(${symbol})"
for nm in `cat $1` ; do
n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'`
echo "#define je_${n} JEMALLOC_N(${n})"
done

View File

@@ -1,27 +0,0 @@
malloc_conf
malloc_message
malloc
calloc
posix_memalign
aligned_alloc
realloc
free
mallocx
rallocx
xallocx
sallocx
dallocx
nallocx
mallctl
mallctlnametomib
mallctlbymib
malloc_stats_print
malloc_usable_size
memalign
valloc
allocm
rallocm
sallocm
dallocm
nallocm

View File

@@ -1,5 +1,6 @@
#!/bin/sh
for symbol in `cat $1` ; do
echo "#undef je_${symbol}"
for nm in `cat $1` ; do
n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'`
echo "#undef je_${n}"
done