MINOR: pools: create unified pool_{get_from,put_to}_cache()
authorWilly Tarreau <w@1wt.eu>
Sun, 18 Apr 2021 09:11:14 +0000 (11:11 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Apr 2021 13:24:33 +0000 (15:24 +0200)
commit147e1fa38576188d4432fbb63b987010028ac986
treed75007325ea6f3d593a7fd2eb93e55aab3de83f7
parentb8498e961acde3b595b7d3db06d99fa9736bae03
MINOR: pools: create unified pool_{get_from,put_to}_cache()

These two functions are now responsible for allocating directly from
the cache and releasing to the cache.

Now the pool_alloc() function simply does this:

    if cache enabled
       return pool_alloc_from_cache() if no NULL
    return pool_alloc_nocache() otherwise

and the pool_free() function does this:

    if cache enabled
       pool_put_to_cache()
    else
       pool_free_nocache()

For now this only introduces these two functions without changing anything
else, but the goal is to soon allow to make them implementation-specific.
include/haproxy/pool.h