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.
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
*/
|
||||
#ifdef JEMALLOC_UNIT_TEST
|
||||
# define JEMALLOC_JET
|
||||
# define JEMALLOC_MANGLE
|
||||
# include "jemalloc/internal/jemalloc_internal.h"
|
||||
|
||||
/******************************************************************************/
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user