| ... | @@ -120,7 +120,7 @@ pub const ArenaAllocator = struct { | ... | @@ -120,7 +120,7 @@ pub const ArenaAllocator = struct { |
| 120 | } | 120 | } |
| 121 | const total_size = switch (mode) { | 121 | const total_size = switch (mode) { |
| 122 | .retain_capacity => current_capacity, | 122 | .retain_capacity => current_capacity, |
| 123 | .retain_with_limit => |limit| std.math.min(limit, current_capacity), | 123 | .retain_with_limit => |limit| std.math.min(@sizeOf(BufNode) + limit, current_capacity), |
| 124 | .free_all => unreachable, | 124 | .free_all => unreachable, |
| 125 | }; | 125 | }; |
| 126 | const align_bits = std.math.log2_int(usize, @alignOf(BufNode)); | 126 | const align_bits = std.math.log2_int(usize, @alignOf(BufNode)); |