summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2019-07-25 18:15:08 (GMT)
committerQi Wang <interwq@gmail.com>2019-07-25 20:10:03 (GMT)
commit10fcff6c38c08bc2b1a672ff92701012944d843a (patch)
treedf1ab7b2daa09ce242dabe8810a0e09fc5d96230
parenta3fa597921987709eb0aa2258f1b35cc433ae5d4 (diff)
downloadjemalloc-10fcff6c38c08bc2b1a672ff92701012944d843a.zip
jemalloc-10fcff6c38c08bc2b1a672ff92701012944d843a.tar.gz
jemalloc-10fcff6c38c08bc2b1a672ff92701012944d843a.tar.bz2
Lower nthreads in test/unit/retained on 32-bit to avoid OOM.
-rw-r--r--test/unit/retained.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/retained.c b/test/unit/retained.c
index d51a598..7993fd3 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);