Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 846 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 846 Bytes

system_alloc_stats

crates.io docs.rs actively maintained

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());
    (...)
}