Convert ALLOCM_ARENA() test to MALLOCX_ARENA() test.
This commit is contained in:
parent
67fd1e0700
commit
c2dcfd8ded
@ -141,7 +141,7 @@ TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \
|
|||||||
$(srcroot)test/integration/xallocx.c
|
$(srcroot)test/integration/xallocx.c
|
||||||
ifeq ($(enable_experimental), 1)
|
ifeq ($(enable_experimental), 1)
|
||||||
TESTS_INTEGRATION += $(srcroot)test/integration/allocm.c \
|
TESTS_INTEGRATION += $(srcroot)test/integration/allocm.c \
|
||||||
$(srcroot)test/integration/ALLOCM_ARENA.c \
|
$(srcroot)test/integration/MALLOCX_ARENA.c \
|
||||||
$(srcroot)test/integration/rallocm.c
|
$(srcroot)test/integration/rallocm.c
|
||||||
endif
|
endif
|
||||||
TESTS_STRESS :=
|
TESTS_STRESS :=
|
||||||
|
@ -8,7 +8,7 @@ thd_start(void *arg)
|
|||||||
unsigned thread_ind = (unsigned)(uintptr_t)arg;
|
unsigned thread_ind = (unsigned)(uintptr_t)arg;
|
||||||
unsigned arena_ind;
|
unsigned arena_ind;
|
||||||
void *p;
|
void *p;
|
||||||
size_t rsz, sz;
|
size_t sz;
|
||||||
|
|
||||||
sz = sizeof(arena_ind);
|
sz = sizeof(arena_ind);
|
||||||
assert_d_eq(mallctl("arenas.extend", &arena_ind, &sz, NULL, 0), 0,
|
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()");
|
sizeof(const char *)), 0, "Error in mallctlbymib()");
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_d_eq(allocm(&p, &rsz, 1, ALLOCM_ARENA(arena_ind)),
|
p = mallocx(1, MALLOCX_ARENA(arena_ind));
|
||||||
ALLOCM_SUCCESS, "Unexpected allocm() error");
|
assert_ptr_not_null(p, "Unexpected mallocx() error");
|
||||||
dallocm(p, 0);
|
dallocx(p, 0);
|
||||||
|
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user