#arena-allocator #arena #alloc #safe #complexity #untyped #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

#669 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