3 releases (breaking)

0.3.0 Sep 6, 2018
0.2.0 Sep 5, 2018
0.1.0 Aug 19, 2018
Download history 18/week @ 2018-08-23 1/week @ 2018-08-30 20/week @ 2018-09-06

12 downloads per month

MIT/Apache

8KB
195 lines

Trove

An arena allocator.

The arena keeps every appended value in a fixed memory location, and only deallocates them all at once.

The arena also allows safe mutable access to the stored elements, through a RefCell wrapper.

Example

let arena = Arena::new();

let a = arena.append(0);
let b = arena.append(1);

assert_eq!(*arena.get(&a), 0);

*arena.get_mut(&b) += 1;

assert_eq!(*arena.get(&b), 2);


lib.rs:

When a value is put into the Arena, it will stay there for the whole lifetime of the arena, and never move.

No runtime deps