| Crates.io | system_alloc_stats |
| lib.rs | system_alloc_stats |
| version | 0.1.0 |
| created_at | 2023-08-11 15:12:16.84634+00 |
| updated_at | 2023-08-11 15:12:16.84634+00 |
| description | A wrapper exposing some stats for the System allocator. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 942008 |
| size | 25,296 |
system_alloc_stats provides a wrapper around the System allocator, exposing some of its runtime statistics.
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());
(...)
}