initial statistics api

This commit is contained in:
Daan Leijen 2025-03-02 15:34:37 -08:00
parent 1b749ea7d8
commit 09ad6d2819
11 changed files with 380 additions and 179 deletions

View file

@ -167,6 +167,11 @@ static void mi_heap_collect_ex(mi_heap_t* heap, mi_collect_t collect)
// collect arenas (this is program wide so don't force purges on abandonment of threads)
_mi_arenas_collect(collect == MI_FORCE /* force purge? */);
// merge statistics
if (collect <= MI_FORCE) {
mi_stats_merge();
}
}
void _mi_heap_collect_abandon(mi_heap_t* heap) {