small fixes; max object size 1/8th of a pages

This commit is contained in:
daanx 2024-12-19 21:30:03 -08:00
parent 9a4c264e76
commit 3746bf79ed
6 changed files with 21 additions and 17 deletions

View file

@ -313,7 +313,7 @@ static bool mi_arena_reserve(size_t req_size, bool allow_large, mi_arena_id_t re
if (arena_count >= 1 && arena_count <= 128) {
// scale up the arena sizes exponentially every 4 entries
const size_t multiplier = (size_t)1 << _mi_clamp(arena_count/4, 0, 16);
const size_t multiplier = (size_t)1 << _mi_clamp(arena_count/2, 0, 16);
size_t reserve = 0;
if (!mi_mul_overflow(multiplier, arena_reserve, &reserve)) {
arena_reserve = reserve;