Crate oxc_allocator

Source
Expand description

§⚓ Oxc Memory Allocator

Oxc uses a bump-based memory arena for faster AST allocations.

This crate contains an Allocator for creating such arenas, as well as ports of data types from std adapted to use this arena:

See Allocator docs for information on efficient use of Allocator.

Re-exports§

pub use hash_map::HashMap;
pub use string::String;

Modules§

hash_map
A hash map without Drop, that uses FxHasher to hash keys, and stores data in arena allocator.
string
Arena String.

Structs§

Address
Memory address of an AST node in arena.
Allocator
A bump-allocated memory arena.
Box
A Box without Drop, which stores its data in the arena allocator.
Vec
A Vec without Drop, which stores its data in the arena allocator.

Traits§

CloneIn
A trait to explicitly clone an object into an arena allocator.
FromIn
This trait works similarly to the standard library From trait, It comes with a similar implementation containing blanket implementation for IntoIn, reflective implementation and a bunch of primitive conversions from Rust types to their arena equivalent.
GetAddress
Trait for getting the memory address of an AST node.
IntoIn
This trait works similarly to the standard library Into trait. It is similar to FromIn is reflective, A FromIn implementation also implicitly implements IntoIn for the opposite type.