Crate rustc_arena

Source
Expand description

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 several kinds of arena.

Macros§

declare_arena
Declare an Arena containing one dropless arena and many typed arenas (the types of the typed arenas are specified by the arguments).

Structs§

ArenaChunk πŸ”’
DroplessArena
An arena that can hold objects of multiple different types that impl Copy and/or satisfy !mem::needs_drop.
IsCopy
IsNotCopy
TypedArena
An arena that can hold objects of only one type.

Constants§

DROPLESS_ALIGNMENT πŸ”’
HUGE_PAGE πŸ”’
PAGE πŸ”’

Functions§

align_down πŸ”’
align_up πŸ”’
outline πŸ”’
This calls the passed function while ensuring it won’t be inlined into the caller.