Rust global allocator support for the in-tree mimalloc build.
use mimalloc_pprof::{prof, MiMalloc};
#[global_allocator] static ALLOCATOR: MiMalloc = MiMalloc;
# fn main() -> std::io::Result<()> {
prof::start(512 * 1024);
prof::dump_file(std::path::Path::new("heap.prof"))?;
# Ok(()) }
See the README's Rust integration guide for frame-pointer and line-table
build flags. Open the resulting profile with pprof -http=: app.exe heap.prof.