diff options
author | Jason Evans <je@fb.com> | 2013-12-13 23:07:43 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2013-12-13 23:07:43 (GMT) |
commit | 34779914400988922d36815b7085893fbcc89a2e (patch) | |
tree | 44d286984d5a1ddbe3d1957432f043e7e32117e0 /test | |
parent | d82a5e6a34f20698ab9368bb2b4953b81d175552 (diff) | |
download | jemalloc-34779914400988922d36815b7085893fbcc89a2e.zip jemalloc-34779914400988922d36815b7085893fbcc89a2e.tar.gz jemalloc-34779914400988922d36815b7085893fbcc89a2e.tar.bz2 |
Fix name mangling issues.
Move je_* definitions from jemalloc_macros.h.in to jemalloc_defs.h.in,
because only the latter is an autoconf header (#undef substitution
occurs).
Fix unit tests to use automatic mangling, so that e.g. mallocx is
macro-substituted to becom jet_mallocx.
Diffstat (limited to 'test')
-rw-r--r-- | test/include/test/jemalloc_test.h.in | 1 | ||||
-rw-r--r-- | test/unit/mq.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/include/test/jemalloc_test.h.in b/test/include/test/jemalloc_test.h.in index 9f7dfa4..38db000 100644 --- a/test/include/test/jemalloc_test.h.in +++ b/test/include/test/jemalloc_test.h.in @@ -64,6 +64,7 @@ */ #ifdef JEMALLOC_UNIT_TEST # define JEMALLOC_JET +# define JEMALLOC_MANGLE # include "jemalloc/internal/jemalloc_internal.h" /******************************************************************************/ diff --git a/test/unit/mq.c b/test/unit/mq.c index e6cba10..f57e96a 100644 --- a/test/unit/mq.c +++ b/test/unit/mq.c @@ -39,7 +39,7 @@ thd_receiver_start(void *arg) for (i = 0; i < (NSENDERS * NMSGS); i++) { mq_msg_t *msg = mq_get(mq); assert_ptr_not_null(msg, "mq_get() should never return NULL"); - jet_dallocx(msg, 0); + dallocx(msg, 0); } return (NULL); } @@ -53,7 +53,7 @@ thd_sender_start(void *arg) for (i = 0; i < NMSGS; i++) { mq_msg_t *msg; void *p; - p = jet_mallocx(sizeof(mq_msg_t), 0); + p = mallocx(sizeof(mq_msg_t), 0); assert_ptr_not_null(p, "Unexpected allocm() failure"); msg = (mq_msg_t *)p; mq_put(mq, msg); |