diff options
author | Nicholas Nethercote <nnethercote@mozilla.com> | 2017-05-26 10:57:30 +1000 |
---|---|---|
committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2017-05-29 10:16:55 +1000 |
commit | 6d5b1242dbcaf00415a925de14c8f3c31163d920 (patch) | |
tree | f8cdfc833ef33a36cd24e746f410f39a4dd4925a /components/script/dom/bindings/codegen/parser | |
parent | 4ec2e8b4c56c914af9fd570acaef85460f322fa9 (diff) | |
download | servo-6d5b1242dbcaf00415a925de14c8f3c31163d920.tar.gz servo-6d5b1242dbcaf00415a925de14c8f3c31163d920.zip |
Introduce and start using the MallocSizeOf trait.
MallocSizeOf is similar to the existing HeapSizeOf trait from the
heapsize crate. The only difference is that MallocSizeOf's
malloc_size_of_children() function takes an additional MallocSizeOfFn
argument, which is used to measure heap blocks. This extra argument
makes MallocSizeOf match how Gecko's memory measurements work, and is
required for Stylo to integrate with DMD.
The patch also introduces a second trait, MallocSizeOfWithGuard, which
is much the same as MallocSizeOf, but with a |guard| argument for the
global style lock.
Finally, the patch uses the new traits to measure a small amount of
Stylo's memory usage.
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
0 files changed, 0 insertions, 0 deletions