Registry / utility / bumpalo

bumpalo

JSON →
library3.20.3rscratesunverified

A fast bump allocation arena for Rust that provides efficient memory allocation for short-lived objects.

# Cargo.toml [dependencies] bumpalo = "3.20.3"
INSTALL
IMPORT
SIG · BUMPALO
B
bumpalo
utilityrustv3.20.3
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.

Bump
use bumpalo::Bump;

Allocates integers and strings in a bump arena without individual deallocation.

use bumpalo::Bump; let bump = Bump::new(); let x = bump.alloc(42); let y = bump.alloc("hello"); println!("{} {}", x, y);
Debug
Known issues
gotchaBump allocated memory is only freed when the Bump is dropped; long-lived allocations may waste memory.
fix
Use Bump for short-lived or phase-based allocations; consider reset() to reuse memory.
affects: >=3.0.0
Upgrade
Version history
3.20.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
bumpalo — cargo add bumpalo · libregistry