An instrumenting middleware for global allocators in Rust, useful in testing for validating assumptions regarding allocation patterns, and potentially in production loads to monitor for memory leaks.
```rust extern crate stats_alloc;
use stats_alloc::{StatsAlloc, Region}; use std::alloc::System;
static STATS_ALLOC: StatsAlloc
fn exampleusingregion() {
let reg = Region::new(&STATSALLOC);
let x: Vec