Expand description
The allocator’s own exact statistics, as opposed to the sampled numbers
crate::prof::stats reports.
This is upstream mimalloc’s mimalloc-stats.h surface. Note what is not here:
hole-purging and idle-sweep gauges are not part of mi_stats_t — they live in
crate::purge_holes_stats, because the sweep also covers pages that no heap owns
and mi_stats_t cannot grow (it is embedded in a theap, at the meta-allocator’s 8 KB
block limit).
malloc_requested is only maintained when the C library was built with MI_STAT >= 2
(upstream enables that for debug builds only); a default release build reports 0 for
it and for nothing else.
Structs§
- Stats
- An owned copy of
mi_stats_t, boxed because it is ~4 KB.
Enums§
- Subproc
- Which subprocess a subprocess-scoped call refers to.
Functions§
- bin_
size - The block size served by size bin
bin(0..=sys::MI_BIN_HUGE), matching themalloc_bins/page_binsindices. - get
- Statistics for the current subprocess and all its heaps, aggregated.
- json
- The same statistics as
get, rendered as JSON by the C library. - Print the current subprocess’s statistics to mimalloc’s output sink.
- subproc_
get - Statistics for one subprocess and all its heaps, aggregated.
- subproc_
get_ exclusive - Statistics for one subprocess without aggregating its heaps.
- subproc_
heap_ print - Print one subprocess and each of its heaps separately to mimalloc’s output sink.
- subproc_
json - One subprocess’s aggregated statistics as JSON.
- subproc_
print - Print one subprocess’s aggregated statistics to mimalloc’s output sink.