fix decommit for huge objects

This commit is contained in:
Daan Leijen 2022-11-23 09:50:29 -08:00
parent 20880807ce
commit 9e56567d23
4 changed files with 39 additions and 27 deletions

View file

@ -91,7 +91,7 @@ static bool chance(size_t perc, random_t r) {
static void* alloc_items(size_t items, random_t r) {
if (chance(1, r)) {
if (chance(1, r) && allow_large_objects) items *= 10000; // 0.01% giant
if (chance(1, r) && allow_large_objects) items *= 50000; // 0.01% giant
else if (chance(10, r) && allow_large_objects) items *= 1000; // 0.1% huge
else items *= 100; // 1% large objects;
}