From fee9e40a8da75fad9717668f6dddcc26f3feca2d Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 1 Nov 2023 09:56:08 -0300 Subject: malloc: Decorate malloc maps Add anonymous mmap annotations on loader malloc, malloc when it allocates memory with mmap, and on malloc arena. The /proc/self/maps will now print: [anon: glibc: malloc arena] [anon: glibc: malloc] [anon: glibc: loader malloc] On arena allocation, glibc annotates only the read/write mapping. Checked on x86_64-linux-gnu and aarch64-linux-gnu. Reviewed-by: DJ Delorie --- elf/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'elf/Makefile') diff --git a/elf/Makefile b/elf/Makefile index 33f88bae96..328dbe82de 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -2983,3 +2983,7 @@ $(objpfx)tst-dlclose-lazy.out: \ $(objpfx)tst-dlclose-lazy-mod1.so $(objpfx)tst-dlclose-lazy-mod2.so $(objpfx)tst-decorate-maps: $(shared-thread-library) + +tst-decorate-maps-ENV = \ + GLIBC_TUNABLES=glibc.malloc.arena_max=8:glibc.malloc.mmap_threshold=1024 +tst-decorate-maps-ARGS = 8 -- cgit v1.2.3