merge new statistics from dev

This commit is contained in:
Daan Leijen 2025-03-02 15:52:52 -08:00
commit fcc2b561e9
16 changed files with 443 additions and 223 deletions

View file

@ -61,6 +61,7 @@ static bool main_participates = false; // main thread participates as a
#define custom_free(p) free(p)
#else
#include <mimalloc.h>
#include <mimalloc-stats.h>
#define custom_calloc(n,s) mi_calloc(n,s)
#define custom_realloc(p,s) mi_realloc(p,s)
#define custom_free(p) mi_free(p)
@ -336,8 +337,13 @@ int main(int argc, char** argv) {
#ifndef NDEBUG
mi_debug_show_arenas();
mi_collect(true);
char* json = mi_stats_get_json(0, NULL);
if (json != NULL) {
fputs(json,stderr);
mi_free(json);
}
#endif
mi_stats_print(NULL);
mi_stats_print(NULL);
#endif
//bench_end_program();
return 0;