From 7d9067ca2c0487dd43c127cdc5d09b3565601991 Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Wed, 14 Apr 2010 21:12:05 +0000 Subject: Make memstat easier to read, add missing Intel ID and cleanups. --- intern/guardedalloc/intern/mallocn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'intern/guardedalloc') diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 806f8d183ba..94453e91912 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -463,12 +463,17 @@ void MEM_printmemlist_stats() /* sort by length and print */ qsort(printblock, totpb, sizeof(MemPrintBlock), compare_len); printf("\ntotal memory len: %.3f MB\n", (double)mem_in_use/(double)(1024*1024)); + printf(" ITEMS TOTAL-MiB AVERAGE-KiB TYPE\n"); for(a=0, pb=printblock; aname, pb->items, (double)pb->len/(double)(1024*1024)); + printf("%6d (%8.3f %8.3f) %s\n", pb->items, (double)pb->len/(double)(1024*1024), (double)pb->len/1024.0/(double)pb->items, pb->name); free(printblock); mem_unlock_thread(); + +#if 0 /* GLIBC only */ + malloc_stats(); +#endif } /* Prints in python syntax for easy */ -- cgit v1.2.3