Custom Memory Allocation

wee_alloc

wee_alloc wee_alloc-crates.io wee_alloc-github wee_alloc-lib.rs cat-memory-management cat-no-std cat-wasm cat-web-programming cat-embedded

wee_alloc: The Wasm-Enabled, Elfin Allocator

Pre-allocated Storage for a Uniform Data Type

slab

slab slab-crates.io slab-github slab-lib.rs cat-data-structures cat-memory-management cat-no-std

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

bumpalo bumpalo-crates.io bumpalo-github bumpalo-lib.rs cat-memory-management cat-no-std cat-rust-patterns

A fast bump allocation arena for Rust.

Garbage Collection with seize

seize seize-crates.io seize-github seize-lib.rs cat-concurrency cat-memory-management

Fast, efficient, and predictable memory reclamation for concurrent data structures.

seize FIXME