<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I think that MallocChecker is the best place for memory tracking.
I'm for generalizing the MallocChecker, renaming it and moving to
the 'general' category.<br>
<br>
<blockquote
cite="mid:B27C01D7-52F3-42AB-938F-1578A35B287C@apple.com"
type="cite">
<div>[+Anna, Anton] This does seem very much like a new allocation
family. Do we have a policy on how we're going to handle these
in general, though? The MacOSKeychainAPIChecker also handles
allocation-like tracking, as does SimpleStreamChecker. What does
everyone think we should do?</div>
<div><br>
</div>
<div>My personal opinion (though without thinking too long) is
that aggregating new allocators under MallocChecker is the right
thing to do for now—i.e. we should take this patch. We may even
want to come up with a way to make this nicely
extensible/configurable in the future. But there are a <i>lot</i> of
APIs that work this way, so...</div>
<div><br>
</div>
<div>(We can keep SimpleStreamChecker distinct even if we fold
fopen/fclose under MallocChecker, since it's still a good
example of how the analyzer works.)</div>
<div><br>
</div>
<div>Jordan</div>
<div><br>
</div>
<br>
<div>
<div>On Aug 26, 2014, at 8:45 , Daniel Fahlgren <<a
moz-do-not-send="true" href="mailto:daniel@fahlgren.se">daniel@fahlgren.se</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">Hi,<br>
<br>
The MallocChecker does currently not track the memory
allocated by<br>
if_nameindex. That memory is dynamically allocated and should
be freed<br>
by calling if_freenameindex. The attached patch teaches the
checker<br>
about these functions.<br>
<br>
Memory allocated by if_nameindex is treated as a separate
allocation<br>
"family". That way the checker can verify it is freed by the
correct<br>
function.<br>
<br>
Any comments / feedback?<br>
<br>
Best regards,<br>
Daniel Fahlgren<br>
<span><ifnameindex.patch></span></blockquote>
</div>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Anton</pre>
</body>
</html>