- implement a malloc-clean backtrace() function
- make some room to store the backtraces. Only for big blocks for now,
the memory consumption seem to be very high when doing so for
fragments. Possible solutions include:
- increasing the minimal fragment size to reduce the amount of
possible fragment per block. It will waste some blocks for very
small fragments, but it will save metadata that is paid for EVERY
block, including full blocks, through the union in the metadata
- Reduce the size of the saved backtraces. For now, we save up to 10
calls, 5 to 3 levels may be enough if space is scarce.
- use that framework to save the backtraces in one malloc execution
path. Other malloc execution paths, as well as realloc paths should
now be changed to store the backtrace too.
- Implement a mmalloc_backtrace_display() function that displays the
backtrace at which the block where malloc()ed. This is a bit crude
for now, as we reuse the internals of exceptions that where not
really done for that, but it works.