Expand description
A tree-backed slab allocator
Differences with the slab crate
Entries into the slab
crate’s slab structure are backed by a linked lists,
which makes it expensive to iterate over. According to slab’s
iterator docs:
Slab::iter
should generally be avoided as it is not efficient. Iterators must iterate over every slot in the slab even if it is vacant. As such, a slab with a capacity of 1 million but only one stored value must still iterate the million slots.
This crate uses a tree to hold the indexes instead, ensuring that iterating over the entries in the slab remains cheap.
Examples
// tbi
Structs
- An owned iterator over items in the
Slab
. - An owned iterator over items in the
Slab
. - An borrowing iterator over items in the
Slab
. - A mutable iterator over items in the
Slab
. - An key into the
Slab
structure. - An borrowing iterator over items in the
Slab
. - A slab allocator
- An borrowing iterator over items in the
Slab
. - A mutable iterator over items in the
Slab
.