]> git.kaiwu.me - haproxy.git/commit
DEBUG: tools: add vma_set_name_id() helper
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 24 May 2024 08:29:08 +0000 (10:29 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 24 May 2024 10:07:13 +0000 (12:07 +0200)
commit9d37c4b989cb5b8d0a0984a505d4715fe87cc9a8
tree5a963484edfc6d0061fbe93cdc64b26296297cac
parent23814a44e5d2c03d343fcaf86cdabc95ca0c31b4
DEBUG: tools: add vma_set_name_id() helper

Just like vma_set_name() from 51a8f134e ("DEBUG: tools: add vma_set_name()
helper"), but also takes <id> as parameter to append "-$id" suffix after
the name in order to differentiate 2 areas that were named using the same
<type> and <name> combination.

example, using mmap + MAP_SHARED|MAP_ANONYMOUS:
  7364c4fff000-736508000000 rw-s 00000000 00:01 3540  [anon_shmem:type:name-id]
Another example, using mmap + MAP_PRIVATE|MAP_ANONYMOUS or using
glibc/malloc() above MMAP_THRESHOLD:
  7364c4fff000-736508000000 rw-s 00000000 00:01 3540  [anon:type:name-id]
include/haproxy/tools.h
src/tools.c