mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
DEBUG: pools: apply poisonning on every allocated pool
Till now, when memory poisonning was enabled, it used to be done only after a calloc(). But sometimes it's not enough to detect unexpected sharing, so let's ensure that we now poison every allocation once it's in place. Note that enabling poisonning significantly hurts performance (it can typically half the overall performance).
This commit is contained in:
parent
f399b0debf
commit
23a5c396ec
@ -179,6 +179,8 @@ void *pool_destroy2(struct pool_head *pool);
|
||||
else { \
|
||||
(pool)->free_list = *(void **)(pool)->free_list;\
|
||||
(pool)->used++; \
|
||||
if (unlikely(mem_poison_byte)) \
|
||||
memset(__p, mem_poison_byte, (pool)->size); \
|
||||
} \
|
||||
__p; \
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user