]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: fd: add name hint for large memory areas
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 21 May 2024 12:30:32 +0000 (14:30 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 21 May 2024 15:55:29 +0000 (17:55 +0200)
commit22ec2ad8b026cbd2dcfe606b222edbba1be18748
tree8c7616489d0b69350efd53c5fc15dcc8d8fb8c0c
parent9424e5a06ffbb484b9bef5abf2e83b73bec0fd4f
DEBUG: fd: add name hint for large memory areas

Thanks to ("MINOR: tools: add vma_set_name() helper"), set a name hint
for large arrays created by fd api (fdtab arrays and so on) so that
that they can be easily identified in /proc/<pid>/maps.

Depending on malloc() implementation, such memory areas will normally be
merged on the heap under MMAP_THRESHOLD (128 kB by default) and will
have a dedicated memory area once the threshold is exceeded. As such, when
large enough, they will appear like this in /proc/<pid>/maps:

7b8e83200000-7b8e84201000 rw-p 00000000 00:00 0                          [anon:fd:fdinfo]
7b8e84400000-7b8e85401000 rw-p 00000000 00:00 0                          [anon:fd:polled_mask]
7b8e85600000-7b8e89601000 rw-p 00000000 00:00 0                          [anon:fd:fdtab_addr]
7b8e90a00000-7b8e90e01000 rw-p 00000000 00:00 0                          [anon:fd:fd_updt]
src/fd.c