system_alloc_stats

Crates.iosystem_alloc_stats
lib.rssystem_alloc_stats
version0.1.0
sourcesrc
created_at2023-08-11 15:12:16.84634
updated_at2023-08-11 15:12:16.84634
descriptionA wrapper exposing some stats for the System allocator.
homepage
repository
max_upload_size
id942008
size25,296
(ljedrz)

documentation

README

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());
    (...)
}
Commit count: 0

cargo fmt