about summary refs log tree commit diff
path: root/malloc/malloc.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-05-30 22:43:52 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-05-30 22:43:52 +0530
commit4d653a59ffeae0f46f76a40230e2cfa9587b7e7e (patch)
tree5db8b13d05ee2c628d5307b621ccc3e4bb33d5aa /malloc/malloc.c
parent5190c17f2280d3aa27cfb057816d09d9af03b167 (diff)
downloadglibc-4d653a59ffeae0f46f76a40230e2cfa9587b7e7e.tar.gz
glibc-4d653a59ffeae0f46f76a40230e2cfa9587b7e7e.tar.xz
glibc-4d653a59ffeae0f46f76a40230e2cfa9587b7e7e.zip
Add mmap usage in malloc_info output
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.
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r--malloc/malloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 963a333fe9..e78f8dfe76 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -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);