4 ms·
The size of each individual object is determined by calling malloc_usable_size on the block itself, so this includes any internal alignment, as well as any padd
by mccr8 11y ago
The size of each individual object is determined by calling malloc_usable_size on the block itself, so this includes any internal alignment, as well as any padding from the allocator after the object proper.
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.
- malkia 11y agoAh, now I see, and it explains the two accumulators. Thanks!