Skip to main content

Module array

Module array 

Source
Expand description

This module implements static and dynamic arrays for in-kernel use.

Structsยง

BitReclaimMap
This is an IndexMap that additionally tracks which indices are occupied through a bitset. WORDS is the number of usize words needed to track N entries, you should set it to WORDS = N.div_ceil(usize::BITS as usize). Its currently impossible to set this value automatically because of const generic limitations.
IndexMap
This is a fixed-size map that can store up to N consecutive elements.
Vec
This is a vector that can store up to N elements inline and will allocate on the heap if more are needed.