Inner state of ArenaAllocator. Can be stored rather than the entire ArenaAllocator as a memory-saving optimization.
Default initialization of this struct is deprecated; use init instead.
pub const State = struct
pub const State = struct {
used_list: ?*Node = null,
free_list: ?*Node = null,
pub const init: State = .{
.used_list = null,
.free_list = null,
};
pub fn promote(state: State, child_allocator: Allocator) ArenaAllocator {
return .{
.child_allocator = child_allocator,
.state = state,
};
}
}