On Sat, Jul 29, 2006 at 03:52:19PM -0700, Eric Anderson wrote: > The difference is that valgrind is size(allocated_bytes - > freed_bytes), whereas memtime is looking at (allocated_bytes - > freed_bytes + external_fragmentation). It is the external > fragmentation caused by the allocation of a little memory after > allocating a large amount that means that even if the large amount is > freed, since the little memory is allocated after it, the resident > size doesn't drop.
Huh, that's a useful example. Of course, things are slightly more subtle even than that... I believe massif is looking at allocated bytes + per currently allocated block overhead + stack size - freed bytes while memtime is looking at allocated bytes - large freed blocks - re-used freed bytes + heap overhead + stack + mmap()'d executable/library size or so? I wonder if there's any convenient way to mask off the read-only mmaps from memtime, it would make the numbers easier to interpret (and in particular, make it much easier to compare massif and memtime in order to measure fragmentation; none of these tools measure fragmentation directly). -- Nathaniel -- "But in Middle-earth, the distinct accusative case disappeared from the speech of the Noldor (such things happen when you are busy fighting Orcs, Balrogs, and Dragons)." _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
