]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: memory: move the OS-level allocator to haproxy/pool-os.h
authorWilly Tarreau <w@1wt.eu>
Sat, 30 May 2020 16:56:17 +0000 (18:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:56 +0000 (10:18 +0200)
commit24aa1eebaa295b14d75583c9a66ac96aa7151eae
tree47ff7879e3ea317fab019c701f93ec687cd2bfbf
parent3646777a77d1b68d3ed0eaff1e17167246ceb204
REORG: memory: move the OS-level allocator to haproxy/pool-os.h

The memory.h file is particularly complex due to the combination of
debugging options. This patch extracts the OS-level interface and
places it into a new file: pool-os.h.

Doing this also moves pool_alloc_area() and pool_free_area() out of
the #ifndef CONFIG_HAP_LOCKLESS_POOLS, making them usable from
__pool_refill_alloc(), pool_free(), pool_flush() and pool_gc() instead
of having direct calls to malloc/free there that are hard to wrap for
debugging purposes.
include/common/memory.h
include/haproxy/pool-os.h [new file with mode: 0644]
src/memory.c