mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
merge new statistics from dev
This commit is contained in:
commit
fcc2b561e9
16 changed files with 443 additions and 223 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue