1 unstable release
0.1.0 | Aug 11, 2023 |
---|
#590 in Memory management
13KB
216 lines
system_alloc_stats
system_alloc_stats provides a wrapper around the System
allocator, exposing some of its runtime statistics.
Usage
use system_alloc_stats::SystemWithStats;
#[global_allocator]
static SWS: SystemWithStats = SystemWithStats;
fn main() {
(...)
println!("current heap use: {}; average allocation size: {}", SWS.use_curr(), SWS.alloc_avg());
(...)
}
Dependencies
~150KB