From 1a9cf7bce26dea6843e2939a5af62b3248dfa9bb Mon Sep 17 00:00:00 2001 From: daanx Date: Mon, 3 Jun 2024 11:43:35 -0700 Subject: [PATCH] switch between OS and arena allocation in stress test --- test/test-stress.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test-stress.c b/test/test-stress.c index 544c2838..5cadb8c6 100644 --- a/test/test-stress.c +++ b/test/test-stress.c @@ -212,6 +212,10 @@ static void test_stress(void) { uintptr_t r = rand(); for (int n = 0; n < ITER; n++) { run_os_threads(THREADS, &stress); + #ifndef NDEBUG + // switch between arena and OS allocation for testing + mi_option_set_enabled(mi_option_disallow_arena_alloc, (n%2)==1); + #endif #ifdef HEAP_WALK size_t total = 0; mi_abandoned_visit_blocks(mi_subproc_main(), -1, true, visit_blocks, &total);