To use a heap implementation in an application that does not
main() and does not initialize the C library:
_init_alloc(to define the base and top of the memory you want to manage as a heap.
The parameters of
_init_alloc(must be eight-byte aligned.
Define the function
unsigned __rt_heap_extend(unsigned size, void **block)to handle calls to extend the heap when it becomes full.