Confirmed users
1,345
edits
Nnethercote (talk | contribs) |
Nnethercote (talk | contribs) |
||
| Line 76: | Line 76: | ||
* On platforms that allow it, they count the actual memory in use, including slop bytes caused by the heap allocator rounding up request sizes (a.k.a. internal fragmentation). If slop bytes aren't measured they'll end up in about:memory's <tt>heap-unclassified</tt> entry, which is bad. | * On platforms that allow it, they count the actual memory in use, including slop bytes caused by the heap allocator rounding up request sizes (a.k.a. internal fragmentation). If slop bytes aren't measured they'll end up in about:memory's <tt>heap-unclassified</tt> entry, which is bad. | ||
* They provide a computed size as well | * They provide a computed size as well. On platforms that cannot measure actual memory in use, this serves as a fallback. | ||
* They are flexible and integrate well with DMD. The <tt>aMallocSizeOf</tt> parameter allows <tt>nsMallocSizeOfFun</tt> functions with DMD-specific hooks to be passed in when they are used by memory reporters, but functions without such hooks (such as <tt>moz_malloc_size_of</tt>) can also be passed in when they are used in other circumstances. | * They are flexible and integrate well with DMD. The <tt>aMallocSizeOf</tt> parameter allows <tt>nsMallocSizeOfFun</tt> functions with DMD-specific hooks to be passed in when they are used by memory reporters, but functions without such hooks (such as <tt>moz_malloc_size_of</tt>) can also be passed in when they are used in other circumstances. | ||