#670·mimalloc

_mi_stats_main.committed.current does goes out of sync with real RSS usage

Author: romangeCreated Dec 21, 2022Updated Sep 14, 2026
Labelsstale

When tracking _mi_stats_main.committed.current I would expect that it won't go bigger than VmRSS in /proc/../status.

In practice, I see that for a long running process, I get:

comitted_memory:98553561088
used_memory_rss:89664389120

which does not make sense to me. We regularly run mi_stats_merge() from all the threads to combine the stats into _mi_stats_main.

Aggregating data from mi_heap_visit_blocks(heap, false, ..) over all threads provides accurate information about committed memory. It is similar to what I would expect to see (close to used_memory_rss).