If defined, the
__user_heap_extent() function returns the bounds of the memory available to the Heap2 allocator.
For AArch32 targets:
For AArch64 targets:
ignore2 are the default values for the base address and size of
the heap. They are for information only and can be ignored.
You only need to implement this function if you are using the Heap2 allocator, which is also part of the C library. This function has no default implementation. The Heap2 allocator calls it during heap initialization to determine the maximum address range that the heap can occupy. The function returns the base address of the heap and the total number of bytes available to the heap, rounded up to the next power of two.
For example, if you want to specify that all your heap allocations will come from address
0x80000000 and above, and that the heap has a total maximum size of 3MiB,
__user_heap_extent() should return
range=0x400000, which is 3MiB rounded up to the next power of two.