Maybe I'm mistaken, but it seems to me that the alignment between elements (at least in C++) is not being taken in account (or maybe I've misunderstood something).
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.