Skip to content

Commit 4d727ee

Browse files
committed
avoid pthread allocation size in mstress bench
1 parent 1817440 commit 4d727ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test-stress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static void* alloc_items(size_t items, random_t r) {
116116
else if (chance(10, r) && allow_large_objects) items *= 1000; // 0.1% huge
117117
else items *= 100; // 1% large objects;
118118
}
119-
if (items == 40) items++; // pthreads uses that size for stack increases
119+
if (items>=32 && items<=40) items*=2; // pthreads uses 320b allocations (this shows that more clearly in the stats)
120120
if (use_one_size > 0) items = (use_one_size / sizeof(uintptr_t));
121121
if (items==0) items = 1;
122122
uintptr_t* p = (uintptr_t*)custom_calloc(items,sizeof(uintptr_t));

0 commit comments

Comments
 (0)