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

@@ -102,10 +102,7 @@
* a separate allocator for their internal data structures.
*/
#elif defined(JEMALLOC_STRESS_TEST)
# define JEMALLOC_NO_DEMANGLE
# include "jemalloc/jemalloc@install_suffix@.h"
# include "jemalloc/internal/public_unnamespace.h"
# undef JEMALLOC_NO_DEMANGLE
# include "jemalloc/jemalloc_protos_jet.h"
@@ -114,8 +111,13 @@
# include "jemalloc/internal/public_unnamespace.h"
# undef JEMALLOC_JET
# include "jemalloc/jemalloc_rename.h"
# define JEMALLOC_MANGLE
# include "jemalloc/jemalloc_mangle@install_suffix@.h"
# ifdef JEMALLOC_STRESS_TESTLIB
# include "jemalloc/jemalloc_mangle_jet.h"
# else
# include "jemalloc/jemalloc_mangle.h"
# endif
/******************************************************************************/
/*