Detect memory leaks and analyze allocation patterns.
Wrap any code block to detect potential memory leaks.
Compare memory state before and after operations.
Track every allocation with detailed statistics.
Automatically check for leaks in CI with Valgrind.
| Feature | Module | Description |
|---|---|---|
| Allocation Tracking | allocation.rs | Track every alloc/dealloc with stats |
| Memory Snapshots | snapshot.rs | Capture and diff memory state |
| Leak Detection | leak_detector.rs | Identify potential memory leaks |
| Heap Profiling | heap.rs | System-level heap analysis |
| Size Histogram | allocation.rs | Distribution of allocation sizes |
Add the profiling feature flag:
prax-query = {{ version = "0.3", features = ["profiling"] }}
Run profiling module tests on every PR
Check for definite memory leaks (Linux)
Runtime memory error detection (nightly)
Heap allocation analysis
Run memory profiling benchmarks:
cargo bench --package prax-query --bench memory_profile_bench