Macro simple_chunk_allocator::heap_bitmap
source · [−]macro_rules! heap_bitmap {
($chunk_amount:path) => { ... };
($chunk_amount:literal) => { ... };
() => { ... };
}
Expand description
Helper macro that initializes a page-aligned static memory area with a correct size to
get used as heap bookkeeping bitmap in crate::GlobalChunkAllocator
.
Example
use simple_chunk_allocator::heap_bitmap;
// chunk size: 256; chunk amount: 16
let heap_bitmap = heap_bitmap!(16);
const CHUNK_AMOUNT: usize = 24;
let heap_bitmap = heap_bitmap!(CHUNK_AMOUNT);