From 4d653a59ffeae0f46f76a40230e2cfa9587b7e7e Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Fri, 30 May 2014 22:43:52 +0530 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ malloc/malloc.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 06d529d7d1..d2a94b29f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-05-30 Siddhesh Poyarekar + Roland McGrath + + * malloc/malloc (malloc_info): Also print mmapped statistics. + 2014-05-30 Roland McGrath * sysdeps/unix/sysv/linux/m68k/arch-fork.h: New file. 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, "\n" "\n" + "\n" "\n" "\n" "\n" "\n" "\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); -- 2.43.5