]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pools: allocate most memory pools from an array
authorWilly Tarreau <w@1wt.eu>
Tue, 16 Oct 2018 05:58:39 +0000 (07:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Oct 2018 08:29:26 +0000 (10:29 +0200)
commit0a93b6413f48cc92342893ac7ec8ab93b56a4f85
treea26aeb2b6344752667e04eb078fad1eb87658cf1
parentd5e4de8e5f99108e31dc7a23a0e91c4231e37974
MINOR: pools: allocate most memory pools from an array

For caching it will be convenient to have indexes associated with pools,
without having to dereference the pool itself. One solution could consist
in replacing all pool pointers with integers but this would limit the
number of allocatable pools. Instead here we allocate the 32 first pools
from a pre-allocated array whose base address is known so that it's trivial
to convert a pool to an index in this array. Pools that cannot fit there
will be allocated normally.
doc/management.txt
include/common/memory.h
src/memory.c