allocator_tracer/lib.rs
1use std::{alloc::System, sync::LazyLock};
2
3use parking_lot::Mutex;
4use allocator_api2::vec::Vec;
5
6mod event;
7pub use event::AllocationEvent;
8
9mod tracer;
10pub use tracer::Tracer;
11
12pub mod analysis;
13
14#[cfg(feature = "criterion")]
15pub mod criterion;
16
17pub static ALLOCATOR_EVENTS: LazyLock<Mutex<Vec<AllocationEvent, System>>> = LazyLock::new(|| Mutex::new(Vec::new_in(System)));