diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-05-28 21:10:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-28 21:10:25 -0500 |
commit | aca09436b71e6defe007e1d17a9d79214d094a7b (patch) | |
tree | f8cdfc833ef33a36cd24e746f410f39a4dd4925a /components/script/dom/bindings/codegen/parser | |
parent | 4ec2e8b4c56c914af9fd570acaef85460f322fa9 (diff) | |
parent | 6d5b1242dbcaf00415a925de14c8f3c31163d920 (diff) | |
download | servo-aca09436b71e6defe007e1d17a9d79214d094a7b.tar.gz servo-aca09436b71e6defe007e1d17a9d79214d094a7b.zip |
Auto merge of #17044 - nnethercote:MallocSizeOf, r=emilio
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.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because code is only for Gecko integration.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17044)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
0 files changed, 0 insertions, 0 deletions