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 in dram2_seg for the heap, which is otherwise unused.
heap_allocator!(#[link_section = ".dram2_uninit"] size: 64000);