Update total_used for arena_static_reset_to

This commit is contained in:
gingerBill
2022-10-12 20:30:48 +01:00
parent b84108c4b5
commit 835b8ffa22

View File

@@ -96,8 +96,10 @@ arena_static_reset_to :: proc(arena: ^Arena, pos: uint, loc := #caller_location)
if prev_pos < pos {
mem.zero_slice(arena.curr_block.base[arena.curr_block.used:][:pos-prev_pos])
}
arena.total_used = arena.curr_block.used
return true
} else if pos == 0 {
arena.total_used = 0
return true
}
return false