heap_allocator

Macro heap_allocator 

Source
macro_rules! heap_allocator {
    ($(#[$m:meta])* size: $size:expr) => { ... };
}
Expand description

Initialize a global heap allocator providing a heap of the given size in bytes. This supports attributes.

ยงUsage

// Use 64kB in the same region stack uses (dram_seg), for the heap.
heap_allocator!(size: 64000);
// Use 64kB for the heap in the memory region reclaimed from the bootloader, which is otherwise unused.
heap_allocator!(#[ram(reclaimed)] size: 64000);