]> sourceware.org Git - glibc.git/commitdiff
Add mmap usage in malloc_info output
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 30 May 2014 17:13:52 +0000 (22:43 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 30 May 2014 17:13:52 +0000 (22:43 +0530)
The current malloc_info xml output only has information about
allocations on the heap.  Display information about number of mappings
and total mmapped size to this to complete the picture.

ChangeLog
malloc/malloc.c

index 06d529d7d1559d629c9d1da4adef86c644457265..d2a94b29f454d179029e351a7a87ce092e8198f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-30  Siddhesh Poyarekar  <siddhesh@redhat.com>
+           Roland McGrath  <roland@hack.frob.com>
+
+       * malloc/malloc (malloc_info): Also print mmapped statistics.
+
 2014-05-30  Roland McGrath  <roland@hack.frob.com>
 
        * sysdeps/unix/sysv/linux/m68k/arch-fork.h: New file.
index 963a333fe9788889242c40f1eb18efbc1d3ac224..e78f8dfe765902f9722fb2bfa3859befbe3dd05b 100644 (file)
@@ -5148,12 +5148,14 @@ malloc_info (int options, FILE *fp)
   fprintf (fp,
            "<total type=\"fast\" count=\"%zu\" size=\"%zu\"/>\n"
            "<total type=\"rest\" count=\"%zu\" size=\"%zu\"/>\n"
+          "<total type=\"mmap\" count=\"%zu\" size=\"%zu\"/>\n"
            "<system type=\"current\" size=\"%zu\"/>\n"
            "<system type=\"max\" size=\"%zu\"/>\n"
            "<aspace type=\"total\" size=\"%zu\"/>\n"
            "<aspace type=\"mprotect\" size=\"%zu\"/>\n"
            "</malloc>\n",
            total_nfastblocks, total_fastavail, total_nblocks, total_avail,
+          mp_.n_mmaps, mp_.mmapped_mem,
            total_system, total_max_system,
            total_aspace, total_aspace_mprotect);
 
This page took 0.109957 seconds and 5 git commands to generate.