memuse
memuse copied to clipboard
Traits for inspecting memory usage of Rust types
ref: https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/memuse/debian/patches/tweak-deps.patch
We can't determine the number of nodes in the B-tree from the public API, so we estimate the memory usage as the midpoint between the lower and upper bounds.
While looking up the history of the `heapsize` crate, I found another crate implementing memory usage introspection: https://github.com/Aeledfyr/deepsize
While looking up the history of the `heapsize` crate, I found another more recent crate implementing memory usage introspection: https://github.com/wasmerio/loupe
This crate currently implements a trait-based measurement approach, where trait impls return the amount of memory that their types requested be allocated. [`malloc_size_of`](https://github.com/servo/servo/tree/master/components/malloc_size_of) is an internal component of Servo (that...
I searched for existing crates prior to writing this one, and somehow completely missed the `heapsize` crate from the Servo devs. It takes a very similar approach to this crate,...
Closes #1.
Similarly to how `zeroize::Zeroize` can be derived, we could enable `DynamicUsage` to be derived on structs composed of subtypes that themselves implement `DynamicUsage`.