]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: pools: do not use the extra pointer to link shared elements
authorWilly Tarreau <w@1wt.eu>
Fri, 31 Dec 2021 15:00:19 +0000 (16:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 11:44:19 +0000 (12:44 +0100)
commit799f6143ca2a0a7ff8979ae5850b462363d76437
treea2b253ceab66375fc25946870d1b3b21a7ea2f18
parent4859984a5b7f02fffd9b85a5e1c4c7beef47382a
CLEANUP: pools: do not use the extra pointer to link shared elements

This practice relying on POOL_LINK() dates from the era where there were
no pool caches, but given that the structures are a bit more complex now
and that pool caches do not make use of this feature, it is totally
useless since released elements have already been overwritten, and yet
it complicates the architecture and prevents from making simplifications
and optimizations. Let's just get rid of this feature. The pointer to
the origin pool is preserved though, as it helps detect incorrect frees
and serves as a canary for overflows.
include/haproxy/pool-t.h
include/haproxy/pool.h
src/pool.c