ce426f
commit 4d653a59ffeae0f46f76a40230e2cfa9587b7e7e
ce426f
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
ce426f
Date:   Fri May 30 22:43:52 2014 +0530
ce426f
ce426f
    Add mmap usage in malloc_info output
ce426f
    
ce426f
    The current malloc_info xml output only has information about
ce426f
    allocations on the heap.  Display information about number of mappings
ce426f
    and total mmapped size to this to complete the picture.
ce426f
ce426f
diff -pruN glibc-2.17-c758a686/malloc/malloc.c glibc-2.17-c758a686/malloc/malloc.c
ce426f
--- glibc-2.17-c758a686/malloc/malloc.c	2014-06-02 07:35:22.573256155 +0530
ce426f
+++ glibc-2.17-c758a686/malloc/malloc.c	2014-06-02 07:34:58.856257177 +0530
ce426f
@@ -6553,12 +6553,14 @@ malloc_info (int options, FILE *fp)
ce426f
   fprintf (fp,
ce426f
 	   "<total type=\"fast\" count=\"%zu\" size=\"%zu\"/>\n"
ce426f
 	   "<total type=\"rest\" count=\"%zu\" size=\"%zu\"/>\n"
ce426f
+	   "<total type=\"mmap\" count=\"%d\" size=\"%zu\"/>\n"
ce426f
 	   "<system type=\"current\" size=\"%zu\"/>\n"
ce426f
 	   "<system type=\"max\" size=\"%zu\"/>\n"
ce426f
 	   "<aspace type=\"total\" size=\"%zu\"/>\n"
ce426f
 	   "<aspace type=\"mprotect\" size=\"%zu\"/>\n"
ce426f
 	   "</malloc>\n",
ce426f
 	   total_nfastblocks, total_fastavail, total_nblocks, total_avail,
ce426f
+	   mp_.n_mmaps, mp_.mmapped_mem,
ce426f
 	   total_system, total_max_system,
ce426f
 	   total_aspace, total_aspace_mprotect);
ce426f