mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 22:19:32 +03:00
avoid pthread allocation size in mstress bench
This commit is contained in:
parent
18174400b2
commit
4d727ee6e6
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue