#arena-allocator #untyped #alloc #complexity #safe #drop

untyped-arena

untyped-arena provides an Arena allocator implementation that is safe and untyped with minimal complexity

2 releases

0.1.1 Jan 8, 2022
0.1.0 Jan 8, 2022

#665 in Memory management

MIT license

6KB
113 lines

untyped-arena

untyped-arena provides an Arena allocator implementation that is safe and untyped with minimal complexity

Usage

let arena = Arena::new();
// create our object, and allocate it within `arena`
let my_struct: &mut MyStruct = arena.alloc(MyStruct { ... });
// dropping the arena drops `my_struct`
drop(arena);
// my_struct can no longer be referenced here

No runtime deps