summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2014-03-28 17:40:03 (GMT)
committerJason Evans <je@fb.com>2014-03-28 17:40:03 (GMT)
commitc2dcfd8ded8162cddb143836c12d003840fdeaeb (patch)
treeff5aaa0827c205542f67fe857f129838420adc66
parent67fd1e0700909381a71fd04d9cbd3d81fa5f0430 (diff)
downloadjemalloc-c2dcfd8ded8162cddb143836c12d003840fdeaeb.zip
jemalloc-c2dcfd8ded8162cddb143836c12d003840fdeaeb.tar.gz
jemalloc-c2dcfd8ded8162cddb143836c12d003840fdeaeb.tar.bz2
Convert ALLOCM_ARENA() test to MALLOCX_ARENA() test.
-rw-r--r--Makefile.in2
-rw-r--r--test/integration/MALLOCX_ARENA.c (renamed from test/integration/ALLOCM_ARENA.c)8
2 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 7399f27..d6b7d6e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -141,7 +141,7 @@ TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \
$(srcroot)test/integration/xallocx.c
ifeq ($(enable_experimental), 1)
TESTS_INTEGRATION += $(srcroot)test/integration/allocm.c \
- $(srcroot)test/integration/ALLOCM_ARENA.c \
+ $(srcroot)test/integration/MALLOCX_ARENA.c \
$(srcroot)test/integration/rallocm.c
endif
TESTS_STRESS :=
diff --git a/test/integration/ALLOCM_ARENA.c b/test/integration/MALLOCX_ARENA.c
index 5bf3c4a..71cf6f2 100644
--- a/test/integration/ALLOCM_ARENA.c
+++ b/test/integration/MALLOCX_ARENA.c
@@ -8,7 +8,7 @@ thd_start(void *arg)
unsigned thread_ind = (unsigned)(uintptr_t)arg;
unsigned arena_ind;
void *p;
- size_t rsz, sz;
+ size_t sz;
sz = sizeof(arena_ind);
assert_d_eq(mallctl("arenas.extend", &arena_ind, &sz, NULL, 0), 0,
@@ -27,9 +27,9 @@ thd_start(void *arg)
sizeof(const char *)), 0, "Error in mallctlbymib()");
}
- assert_d_eq(allocm(&p, &rsz, 1, ALLOCM_ARENA(arena_ind)),
- ALLOCM_SUCCESS, "Unexpected allocm() error");
- dallocm(p, 0);
+ p = mallocx(1, MALLOCX_ARENA(arena_ind));
+ assert_ptr_not_null(p, "Unexpected mallocx() error");
+ dallocx(p, 0);
return (NULL);
}