]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: activity: declare the storage for memory usage statistics
authorWilly Tarreau <w@1wt.eu>
Wed, 5 May 2021 14:50:40 +0000 (16:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 May 2021 16:55:28 +0000 (18:55 +0200)
commitdb87fc7d36b21360d9b7f58fbbf6325e07e98ffa
tree6d466876ec3fbab09be0bc113e4288610dafe888
parent00dd44f67ff07f3904a1417867c2f346523a8f07
MINOR: activity: declare the storage for memory usage statistics

We'll need to store for each call place, the pointer to the caller
(the return address to be more exact as with free() it's not uncommon
to see tail calls), the number of calls to alloc/free and the total
alloc/free bytes. realloc() will be counted either as alloc or free
depending on the balance of the size before vs after.

We store 1024+1 entries. The first ones are used as hashes and the
last one for collisions.

When profiling is enabled via the CLI, all the stats are reset.
src/activity.c