Convert ALLOCM_ARENA() test to MALLOCX_ARENA() test.

This commit is contained in:
Jason Evans 2014-03-28 10:40:03 -07:00
parent 67fd1e0700
commit c2dcfd8ded
2 changed files with 5 additions and 5 deletions

View File

@ -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 :=

View File

@ -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);
}