Files
servo/components/malloc_size_of
d-kraus 70f8a3727e malloc_size_of: Track allocations from parsed SVG trees. (#41481)
Implemented `MallocSizeOf` trait for `usvg::Tree`, `usvg::Node`,
`usvg::Group`, `usvg::Path`, `usvg::ClipPath` and
`tiny_skia_path::Path`.

Testing:
- build servo with `./mach build --features
servo_allocator/allocation-tracking`
- run servo with `UNTRACKED_LOG_FILE=untracked ./mach run`
- after the homepage loads, open a tab to about:memory
- press the Measure button
- when the browser is responsive again, close the browser
- run `grep "usvg::parser::<impl usvg::tree::Tree>::from_data" untracked
| wc -l`


```
Before:
grep "usvg::parser::<impl usvg::tree::Tree>::from_data" untracked | wc -l
130

After:
> grep "usvg::parser::<impl usvg::tree::Tree>::from_data" untracked | wc -l
0
``` 

Fixes: https://github.com/servo/servo/issues/41069

---------

Signed-off-by: Dennis Kraus <kraus@posteo.de>
2025-12-28 17:41:09 +00:00
..