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
The typical pattern is to drive measurement from Criterion's iter_custom function,
feeding its chosen iteration count into iterations so each recorded span covers a
whole sample rather than a single iteration:
use black_box;
use Instant;
use ;
use Criterion;
static ALLOCATOR: = system;
You do not need to specify the iteration count up front, as long as it is provided before the span is dropped. This allows you to measure work whose extent is not known at the start.
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.