Crate typed_arena [] [src]

The arena, a fast but limited type of allocator.

Arenas are a type of allocator that destroy the objects within, all at once, once the arena itself is destroyed. They do not support deallocation of individual objects while the arena itself is still alive. The benefit of an arena is very fast allocation; just a vector push.

This is an equivalent of arena::TypedArena distributed with rustc, but is available of Rust beta/stable.

It is slightly less efficient, but simpler internally and uses much less unsafe code. It is based on a Vec<Vec<T>> instead of raw pointers and manual drops.

Structs

Arena