From: Martin Quinson Date: Wed, 8 Feb 2012 10:47:29 +0000 (+0100) Subject: Setup the framework allowing to add backtraces to the malloc meta-data X-Git-Tag: exp_20120216~46 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/18830ad59a14b63f78de5f8c6864ec894b00f18e?hp=18830ad59a14b63f78de5f8c6864ec894b00f18e Setup the framework allowing to add backtraces to the malloc meta-data - 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. ---