On Monday 2014-05-19 20:09 -0700, Nicholas Nethercote wrote: > On Mon, May 19, 2014 at 5:32 PM, L. David Baron <dba...@dbaron.org> wrote: > > Another is being able to find the root strongly connected components > > of the memory graph, which is useful for finding leaks in other > > systems (e.g., leaks of trees of GTK widget objects) that aren't > > hooked up to cycle collection. It's occasionally even a faster way > > of debugging non-CC but nsTraceRefcnt-logged reference counted > > objects. > > How does trace-malloc do that? It sounds like it would need to know > about object and struct layout.
Roughly the same way a conservative collector would -- assuming any word-aligned memory in one object in the heap that contains something that's the address of something else in the heap (including in the interior of the allocation) is a pointer to that object in the heap. (It's actually done in the leaksoup tool outside of trace-malloc.) -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
signature.asc
Description: Digital signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform