30 releases (4 breaking)

Uses new Rust 2024

new 0.5.17 Feb 26, 2026
0.5.14 Jan 7, 2026
0.5.12 Dec 29, 2025
0.5.9 Nov 10, 2025
0.4.3 Jul 27, 2025

#100 in Memory management

Download history 23/week @ 2025-11-09 118/week @ 2025-11-16 174/week @ 2025-11-23 109/week @ 2025-11-30 180/week @ 2025-12-07 249/week @ 2025-12-14 96/week @ 2025-12-21 101/week @ 2025-12-28 244/week @ 2026-01-04 252/week @ 2026-01-11 486/week @ 2026-01-18 205/week @ 2026-01-25 119/week @ 2026-02-01 420/week @ 2026-02-08 310/week @ 2026-02-15 830/week @ 2026-02-22

1,680 downloads per month
Used in 4 crates

MIT license

80KB
1K SLoC

Memory allocation tracking utilities for benchmarks and performance analysis.

This package provides utilities to track memory allocations during code execution, enabling analysis of allocation patterns in benchmarks and performance tests.

Basic usage

use alloc_tracker::{Allocator, Session};

#[global_allocator]
static ALLOCATOR: Allocator<std::alloc::System> = Allocator::system();

fn main() {
    let session = Session::new();

    // Track a single operation
    {
        let operation = session.operation("my_operation");
        let _span = operation.measure_process();
        let _data = vec![1, 2, 3, 4, 5]; // This allocates memory
    }

    // Print results
    session.print_to_stdout();

    // Session automatically cleans up when dropped
}

See also

More details in the package documentation.

This is part of the Folo project that provides mechanisms for high-performance hardware-aware programming in Rust.

No runtime deps