From 4d727ee6e62b726b22f0fe06866a1501ceb3a0bd Mon Sep 17 00:00:00 2001 From: daanx Date: Sat, 1 Mar 2025 18:30:24 -0800 Subject: [PATCH] avoid pthread allocation size in mstress bench --- test/test-stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-stress.c b/test/test-stress.c index 41f2162b..c41954d3 100644 --- a/test/test-stress.c +++ b/test/test-stress.c @@ -116,7 +116,7 @@ static void* alloc_items(size_t items, random_t r) { else if (chance(10, r) && allow_large_objects) items *= 1000; // 0.1% huge else items *= 100; // 1% large objects; } - if (items == 40) items++; // pthreads uses that size for stack increases + if (items>=32 && items<=40) items*=2; // pthreads uses 320b allocations (this shows that more clearly in the stats) if (use_one_size > 0) items = (use_one_size / sizeof(uintptr_t)); if (items==0) items = 1; uintptr_t* p = (uintptr_t*)custom_calloc(items,sizeof(uintptr_t));