Skip to main content

Crate hislab

Crate hislab 

Source
Expand description

§HiSlab

A high-performance slab allocator using hierarchical bitmaps for O(1) operations.

§Example

use hislab::HiSlab;

let mut slab = HiSlab::<i32>::new(0, 65536).unwrap();

let idx = slab.insert(42);
assert_eq!(slab[idx], 42);

let val = slab.remove(idx);
assert_eq!(val, Some(42));
assert!(slab.get(idx).is_none());

Modules§

buffer_slab
BufferSlab

Structs§

HiSlab
A slab allocator with O(1) insert and remove using hierarchical bitmaps.
SlabIntoIter
SlabIter
SlabIterMut
TaggedHiSlab
A slab allocator with tagging support, built on top of HiSlab.
TaggedIter
TaggedIterMut