Custom Memory Allocation
Recipe | Crates | Categories |
---|---|---|
bumpalo | ||
Garbage Collection with seize | ||
slab | ||
wee_alloc |
wee_alloc
wee_alloc: The Wasm-Enabled, Elfin Allocator
Pre-allocated Storage for a Uniform Data Type
slab
slab
⮳ provides pre-allocated storage for a single data type. If many values of a single type are being allocated, it can be more efficient to pre-allocate the necessary storage. Since the size of the type is uniform, memory fragmentation can be avoided. Storing, clearing, and lookup operations become very cheap.
While slab
may look like other Rust collections, it is not intended to be used as a general purpose collection. The primary difference between slab
and Vec
is that slab
⮳ returns the key when storing the value.
It is important to note that keys may be reused. In other words, once a value associated with a given key is removed from a slab, that key may be returned from future calls to insert.
bumpalo
A fast bump allocation arena for Rust.
Garbage Collection with seize
Fast, efficient, and predictable memory reclamation for concurrent data structures.
seize
⮳ FIXME