<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div>From the name of the function, 'ownership_takes' does seem to be the better match. </div><div><br></div><div>Note, that the checker that uses the annotation (<span style="font-family: Menlo;">MallocOptimistic</span>) is in alpha state and probably needs a major redesign and productization. The functionality that is there now has not been tested much. Currently, that checker assumes that every function which might free memory will be annotated. This applies to functions that free memory indirectly, by calling another function. This greatly limits applicability of the checker. </div><div><br></div><div>We are thinking of augmenting the MallocPessimistic, which assumes that any unknown function can free memory, with annotations on functions which the user has more info about, instead of reviving the MallocOptimistic checker.</div><div><br></div><div>Anna.</div><div><br></div><div>On Apr 18, 2013, at 10:02 AM, Bruce Stephens <<a href="mailto:bruce.r.stephens@gmail.com">bruce.r.stephens@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Shouldn't myfreeBoth be annotated with<br>__attribute((ownership_takes(malloc, 1, 2))) rather than<br>ownership_holds?<br><br>(Makes no practical difference, but logically it makes sense?)<br>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div></blockquote></div><br></body></html>