mirror of
https://github.com/servo/servo.git
synced 2025-10-08 04:29:24 +01:00
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. |
||
---|---|---|
.. | ||
generated | ||
arc_types.rs | ||
conversions.rs | ||
data.rs | ||
global_style_data.rs | ||
media_queries.rs | ||
mod.rs | ||
non_ts_pseudo_class_list.rs | ||
pseudo_element.rs | ||
pseudo_element_definition.mako.rs | ||
regen_atoms.py | ||
restyle_damage.rs | ||
rules.rs | ||
selector_parser.rs | ||
snapshot.rs | ||
snapshot_helpers.rs | ||
traversal.rs | ||
url.rs | ||
values.rs | ||
wrapper.rs |