Thread (33 messages) 33 messages, 6 authors, 2017-09-19

Re: [PATCH 10/10] add UNLEAK annotation for reducing leak false positives

flat view

From: Stefan Beller <hidden>
Date: 2017-09-07 20:39:03

On Thu, Sep 7, 2017 at 2:17 AM, Jeff King [off-list ref] wrote:
quoted
After having a sneak peak at the implementation
it is O(1) in runtime for each added element, and the
space complexity is O(well).
I'm not sure if your "well" is "this does well" or "well, it could be
quite a lot". :)
Both actually. When I wrote it I thought the phonetic interpretation
was way too funny, but nobody can hear subtle humor on mailing
lists. :)

If UNLEAK is used correctly, then it sounds more like
"this does well (and we cannot do better anyway)".
It certainly has the potential to grow the heap without bound (since
after all, it's whole point is to make a giant list of variables that
are going out of scope). But in practice we'd sprinkle this over a
handful of variables just before program exit (and remember that it's
copying only what's on the stack already; so pointers get copied, not
whole heap-allocated blocks).

Plus it does nothing at all when not compiled with leak-checking. So I'm
not too worried about the extra memory usage or performance.
me neither.

Thanks for starting this series (I am really happy about this solution)!
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help