Macro simple_chunk_allocator::heap_bitmap
source · [−]macro_rules! heap_bitmap {
(chunks=$chunk_amount:path) => { ... };
(chunks=$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!(chunks = 16);
const CHUNK_AMOUNT: usize = 24;
let heap_bitmap = heap_bitmap!(chunks = CHUNK_AMOUNT);