Expand description
Stats reporting (mirrors stats.c): per-heap counters live in
crate::heap::Stats; this module aggregates them across the global heap
registry, formats reports through the output hook, and queries process
metrics (mi_process_info).
Functions§
- merged
- Sum the counters of every registered heap (
mi_stats_mergesemantics — our counters are always per-heap, so the merged view is computed on read). - print_
process mi_stats_print/mi_stats_print_out: process-wide (merged) stats.- print_
thread mi_thread_stats_print_out: the calling thread’s heap only.- process_
info mi_process_info: (elapsed_ms, user_ms, system_ms, current_rss, peak_rss, current_commit, peak_commit, page_faults). Best-effort per platform; unknown fields read 0.- reset
mi_stats_reset: zero the CALLING thread’s counters (per-heap model).