heapsize
heapsize copied to clipboard
In support of measuring heap allocations in Rust programs.
Running tests using rust-toolchain `nightly-2019-03-15` all tests failed: ``` failures: ---- test_boxed_slice stdout ---- thread 'test_boxed_slice' panicked at 'assertion failed: `(left == right)` left: `24`, right: `16`', tests/tests.rs:185:5 note: Run...
In a project I found myself needing to calculate the memory used by a `PathBuf` and ended up just ignoring the field. It'd be better if `PathBuf` implemented `HeapSizeOf` though....
The version of [heapsize_derive on crates.io](https://crates.io/crates/heapsize_derive) still has MPL as its license. Since then, heapsize_derive has been relicensed to MIT/Apache2.0 though. The heapsize crate itself has seen a release since,...
This change is [](https://reviewable.io/reviews/servo/heapsize/101)
I just encountered an issue where the `heapSizeOf` derive wasn't able to parse `dyn Trait` in a struct, so I thought I'd make a PR to update `heapsize_derive` to use...
Noob question: I have an enum with a variant that contains just a `Vec`. I derive `HeapSizeOf` on the enum using the macro from the heapsize_derive crate. Results are the...
I needed this for my own purposes; hopefully someone will find it useful. It takes a very naive approach in line with the approach already taken for `BTreeMap` and ignores...
A central idea behind this crate is that most resources in Rust have one well-defined owner. `heap_size_of_children` can trace recursively and only consider owned resources. For `&T` references it can...
It is better to have no measurements rather than blatantly incorrect ones. --- This change is [](https://reviewable.io/reviews/servo/heapsize/87)
> \ In heapsize_derive we do https://github.com/servo/heapsize/blob/master/derive/lib.rs#L36-L42, > \ could serde do something similar for array fields? > \ nice, yes we could > \ let me make a ticket...