Confirmed users
1,345
edits
Nnethercote (talk | contribs) No edit summary |
Nnethercote (talk | contribs) |
||
Line 61: | Line 61: | ||
} | } | ||
[http://mxr.mozilla.org/mozilla-central/source/ | [http://mxr.mozilla.org/mozilla-central/source/mfbt/MemoryReporting.h nscore.h] defines <tt>mozilla::MallocSizeOf</tt> as follows: | ||
typedef size_t(* | typedef size_t (*MallocSizeOf)(const void* p); | ||
Functions with this signature measure the size of <tt>p</tt> by asking the heap allocator how big it is (via <tt>moz_malloc_usable_size</tt>). | |||
All this is probably not what you'd expect, but the above functions have the following crucial features. | All this is probably not what you'd expect, but the above functions have the following crucial features. |