pub unsafe fn init()Expand description
Initializes the heap from extern addresses
This function initializes the heap using the address defined by the extern pointer UMM_MALLOC_CFG_HEAP_ADDR with
size defined by the extern u32 UMM_MALLOC_CFG_HEAP_ADDR. You must define symbols with those (unmangled) names
elsewhere, e.g. in your linker script.
See umm_malloc::init_heap() for runtime initialization.
§Note
- The heap grows “upwards”, towards larger addresses. Thus
end_addrmust be larger thanstart_addr. - The size of the heap is
(end_addr as usize) - (start_addr as usize). The allocator won’t use the byte atend_addr.
§Safety
Obey these or Bad Stuff will happen.
- This function must be called exactly ONCE.
- This function must be called BEFORE you run any code that makes use of the allocator unless the cargo feature
init-if-uninitializedorhang-if-uninitializedis enabled.