summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2023-03-10 13:15:59 -0800
committerQi Wang <interwq@gmail.com>2023-03-13 10:50:10 -0700
commit71bc1a3d91ae7e513488401627eca2a31e9f6e60 (patch)
tree4392d6ebaaf883f31879d2743eef5bbc200bb179
parentf743690739299cb1e72852744bdd79443b264be0 (diff)
downloadjemalloc-71bc1a3d91ae7e513488401627eca2a31e9f6e60.tar.gz
Avoid assuming the arena id in test when percpu_arena is used.
-rw-r--r--test/unit/huge.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/huge.c b/test/unit/huge.c
index ec64e500..53f6577b 100644
--- a/test/unit/huge.c
+++ b/test/unit/huge.c
@@ -82,6 +82,9 @@ TEST_BEGIN(huge_allocation) {
expect_u_gt(arena1, 0, "Huge allocation should not come from arena 0");
dallocx(ptr, 0);
+ test_skip_if(have_percpu_arena &&
+ PERCPU_ARENA_ENABLED(opt_percpu_arena));
+
ptr = mallocx(HUGE_SZ >> 1, 0);
expect_ptr_not_null(ptr, "Fail to allocate half huge size");
expect_d_eq(mallctl("arenas.lookup", &arena2, &sz, &ptr,