From 97b313c7d480bc087b0c805b4bb42b71dd9c9e93 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Thu, 15 Dec 2022 14:36:04 -0800 Subject: [PATCH] More conservative setting for /test/unit/background_thread_enable. Lower the thread and arena count to avoid resource exhaustion on 32-bit. --- test/unit/background_thread_enable.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/unit/background_thread_enable.c b/test/unit/background_thread_enable.c index 44034ac6..5f42feff 100644 --- a/test/unit/background_thread_enable.c +++ b/test/unit/background_thread_enable.c @@ -1,6 +1,6 @@ #include "test/jemalloc_test.h" -const char *malloc_conf = "background_thread:false,narenas:1,max_background_threads:20"; +const char *malloc_conf = "background_thread:false,narenas:1,max_background_threads:8"; static unsigned max_test_narenas(void) { @@ -12,12 +12,9 @@ max_test_narenas(void) { * approximation. */ unsigned ret = 10 * ncpus; - /* Limit the max to avoid VM exhaustion on 32-bit . */ - if (ret > 512) { - ret = 512; - } - return ret; + /* Limit the max to avoid VM exhaustion on 32-bit . */ + return ret > 256 ? 256 : ret; } TEST_BEGIN(test_deferred) {