Registry / utility / typed-arena

typed-arena

JSON →
library2.0.2rscratesunverified

A fast but limited type of allocator for allocating many objects of the same type.

# Cargo.toml [dependencies] typed-arena = "2.0.2"
INSTALL
IMPORT
SIG · TYPED-ARENA
T
typed-arena
utilityrustv2.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Arena
use typed_arena::Arena;

Allocates integers in an arena and uses them.

use typed_arena::Arena; fn main() { let arena = Arena::new(); let x = arena.alloc(42); let y = arena.alloc(100); assert_eq!(*x, 42); }
Debug
Known issues
gotchaArena allocations are never freed individually; memory is reclaimed when the arena is dropped.
fix
Use for long-lived or pooled allocations; avoid for short-lived objects.
affects: >=2.0.0
Upgrade
Version history
2.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
6
Bingbot
4
Resources
typed-arena — cargo add typed-arena · libregistry