Scale by 3/2 rather than 5/4

This commit is contained in:
gingerBill
2023-08-15 15:45:12 +01:00
parent 52318d0e0e
commit 27931249ce

View File

@@ -130,7 +130,7 @@ alloc_from_memory_block :: proc(block: ^Memory_Block, min_size, alignment: uint)
// NOTE(bill): [Heuristic] grow the commit size larger than needed
// TODO(bill): determine a better heuristic for this behaviour
extra_size := max(size, block.committed>>2)
extra_size := max(size, block.committed>>1)
platform_total_commit := base_offset + block.used + extra_size
platform_total_commit = align_formula(platform_total_commit, DEFAULT_PAGE_SIZE)
platform_total_commit = min(platform_total_commit, pmblock.reserved)