struct State [src]

Inner state of ArenaAllocator. Can be stored rather than the entire ArenaAllocator as a memory-saving optimization.

Fields

buffer_list: std.SinglyLinkedList(usize) = .{}
end_index: usize = 0

Members

Source

pub const State = struct { buffer_list: std.SinglyLinkedList(usize) = .{}, end_index: usize = 0, pub fn promote(self: State, child_allocator: Allocator) ArenaAllocator { return .{ .child_allocator = child_allocator, .state = self, }; } }