The comment for the used field in mi_page_t says it includes "blocks in local_free and thread_free". I think the used field only includes the blocks in thread_free, but not local_free.
In other words, blocks in thread_free are counted as in-use, but blocks in free and local_free are not counted as in-use.
The comment for the
used
field inmi_page_t
says it includes "blocks inlocal_free
andthread_free
". I think theused
field only includes the blocks inthread_free
, but notlocal_free
.In other words, blocks in
thread_free
are counted as in-use, but blocks infree
andlocal_free
are not counted as in-use.https://github.com/microsoft/mimalloc/blob/da520480254b8af2ff9d7bf413d92c46c6db52dd/include/mimalloc/types.h#L298