Measuring data structures: Firefox (C++) vs. Servo (Rust)
njn.valgrind.org
njn.valgrind.org
As others have explained, this is a draft, and wasn't intended for wide consumption. The easiest way I've found to show people an unpublished WordPress blog post draft is to just "save page as" in the browser and then put the resulting file up somewhere. I've done this before without problem, but this is the first time I've sent the link to a public mailing list. Lesson learned! Next time I'll send it privately to the relevant people and mark it clearly as a draft. (Or if anyone can tell me a better way to circulate a WordPress draft -- one that works for a blog that is aggregated on planet.mozilla.org -- I'd be happy to hear it.)
I've stripped out all the WordPress links and stuff from the draft post, because that was confusing lots of people. I've also added a big header at the top explaining it's a draft.
The final post, which won't be much different from this version, will go up on my blog (http://blog.mozilla.com/nnethercote/) in the next day or two.
Apologies for the confusion!
[0]: http://wordpress.stackexchange.com/questions/107062/how-do-i...
naming things, cache invalidation and concurrency
(I'd be happy to be proven wrong, though!)
So, you get the size of the object, using the callback. Then, if the object has fields that point to other objects, you call the reporter on those fields. Then those two quantities are totaled.
Wouldn't it be possible to make the annotation smart enough to distinguish between an owning and a non-owning reference?
The reason this is ignored is that we want to figure out how we want to handle things like this (and haven't yet). We can ignore them, count them as <size>/<refcount>, or count their entire size for each owner. Depends on which one is more important for tracing memory bloat.