From 10fcff6c38c08bc2b1a672ff92701012944d843a Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Thu, 25 Jul 2019 11:15:08 -0700 Subject: [PATCH] Lower nthreads in test/unit/retained on 32-bit to avoid OOM. --- test/unit/retained.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/retained.c b/test/unit/retained.c index d51a5981..7993fd3d 100644 --- a/test/unit/retained.c +++ b/test/unit/retained.c @@ -107,6 +107,9 @@ TEST_BEGIN(test_retained) { atomic_store_u(&epoch, 0, ATOMIC_RELAXED); unsigned nthreads = ncpus * 2; + if (LG_SIZEOF_PTR < 3 && nthreads > 16) { + nthreads = 16; /* 32-bit platform could run out of vaddr. */ + } VARIABLE_ARRAY(thd_t, threads, nthreads); for (unsigned i = 0; i < nthreads; i++) { thd_create(&threads[i], thd_start, NULL);