#memory-object #memory #memory-management #heapsize #memory-profiling

no-std feldera-size-of

A crate for measuring the total memory usage of an object

1 unstable release

0.1.5 Aug 29, 2024

#69 in Profiling

Download history 314/week @ 2024-08-27 432/week @ 2024-09-03 469/week @ 2024-09-10 519/week @ 2024-09-17 616/week @ 2024-09-24 474/week @ 2024-10-01 662/week @ 2024-10-08 536/week @ 2024-10-15 680/week @ 2024-10-22 536/week @ 2024-10-29 430/week @ 2024-11-05 401/week @ 2024-11-12

2,133 downloads per month
Used in 3 crates

MIT/Apache

83KB
2.5K SLoC

Crates.io docs.rs

Size Of

A crate for measuring the total memory usage of an object at runtime

Features

size-of has built-in support for many 3rd party crates that can be enabled with feature flags

  • std: Enables support for the rust standard library (enabled by default, when disabled size-of is #![no_std] compatible)
  • derive: Enables support for #[derive(SizeOf)] (enabled by default)
  • time: Enables support for the time crate
    • time-std: Enables support for time's std feature
  • chrono: Enables support for the chrono crate
  • hashbrown: Enables support for the hashbrown crate
  • fxhash: Enables support for the fxhash crate
  • rust_decimal: Enables support for the rust_decimal crate
  • ordered-float: Enables support for the ordered-float crate
  • ahash: Enables support for the ahash crate
    • ahash-std: Enables support for ahash's std feature
  • xxhash-rust: Enables support for the xxhash-rust crate
    • xxhash-xxh32: Enables support for xxhhash-rust's xxh32 feature
    • xxhash-xxh64: Enables support for xxhhash-rust's xxh64 feature
    • xxhash-xxh3: Enables support for xxhhash-rust's xxh3 feature
  • bigdecimal: Enables support for the bigdecimal crate
  • num-bigint: Enables support for the num-bigint crate

Dependencies

~0–6MB
~29K SLoC