[][src]Crate rustc_ap_arena

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 pointer bump.

This crate implements TypedArena, a simple arena that can only hold objects of a single type.

Macros

arena_for_type
declare_arena
which_arena_for_type

Structs

DropArena

An arena which can be used to allocate any type. Allocating in this arena is unsafe since the type system doesn't know which types it contains. In order to allocate safely, you must store a PhantomData alongside this arena for each type T you allocate.

DroplessArena
TypedArena

An arena that can hold objects of only one type.