authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-20 16:30:28-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-20 16:30:28-04:00
logad4b591db1155d52bfce526c695594cc2dda7f14
treedf1d9f47ebbe7ef20ebb120e1d4d2faee34443a0
parent64c149ca19cc299485693acbda325eee51d37f28

small bump to ArenaAllocator minimum alloc size

self-hosted parser benchmark: throughput: 69.4 MiB/s => 72.2 MiB/s

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/heap/arena_allocator.zig+1-1
......@@ -46,7 +46,7 @@ pub const ArenaAllocator = struct {
4646 }
4747
4848 fn createNode(self: *ArenaAllocator, prev_len: usize, minimum_size: usize) !*BufNode {
49 const actual_min_size = minimum_size + @sizeOf(BufNode);
49 const actual_min_size = minimum_size + (@sizeOf(BufNode) + 16);
5050 const big_enough_len = prev_len + actual_min_size;
5151 const len = big_enough_len + big_enough_len / 2;
5252 const buf = try self.child_allocator.alignedAlloc(u8, @alignOf(BufNode), len);