]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: pool: move all the OS specific code to pool-os.h
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 14:30:49 +0000 (15:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Dec 2022 16:32:57 +0000 (17:32 +0100)
commita95636682db151c67cb674eb23ca627a000354de
tree6804ac89bedf9772e401f1336f0056644a190e51
parent76a97a98ca5441913d032ea89201d9129fbcbb6a
REORG: pool: move all the OS specific code to pool-os.h

Till now pool-os used to contain a mapping from pool_{alloc,free}_area()
to pool_{alloc,free}_area_uaf() in case of DEBUG_UAF, or the regular
malloc-based function. And the *_uaf() functions were in pool.c. But
since 2.4 with the first cleanup of the pools, there has been no more
calls to pool_{alloc,free}_area() from anywhere but pool.c, from exactly
one place each. As such, there's no more need to keep *_uaf() apart in
pool.c, we can inline it into pool-os.h and leave all the OS stuff there,
with pool.c calling either based on DEBUG_UAF. This is cleaner with less
round trips between both files and easier to find.
include/haproxy/pool-os.h
src/pool.c