<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 13, 2017 at 11:27 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> writes:<br>
> stash the metadata for each allocation (and pointers for corresponding<br>
> free) in a hash table for all mallocs that we need to track? [this<br>
> avoids the wasted 'space' in each alloc.]<br>
<br>
</span>Sure, but this is just duplicating an implementation of malloc.<br></blockquote><div><br></div><div>Or duplicating an implementation of a "debug" or "tracing" malloc, rather -- one that lets you check for freeing pointers never malloc'ed, memory leaks, etc., since it tracks a bunch of information about each allocation.<br><br></div><div>--Richard <br></div></div><br></div></div>