Crate alloc_cortex_m [−] [src]
A heap allocator for Cortex-M processors
Example
// Plug in the allocator extern crate alloc_cortex_m; extern crate collections; use alloc_cortex_m::HEAP; use collections::Vec; #[no_mangle] pub fn main() -> ! { // Initialize the heap BEFORE you use the allocator unsafe { HEAP.init(0x2000_0000, 1024) } let mut xs = Vec::new(); xs.push(1); // ... }
Structs
Heap |
A heap allocator |
Statics
HEAP |
A global UNINITIALIZED heap allocator |