BUG/MINOR: memory: Set objects size for pools in the per-thread cache

When a memory pool is created, it may be allocated from a static array. This
happens for "most common" pools, allocated first. Objects of these pools may
also be cached in a pool cache. Of course, to not cache too much entries, we
track the number of cached objects and the total size of the cache.

But the objects size of each pool in the cache (ie, pool_cache[tid][idx].size,
where tid is the thread-id and idx is the index of the pool) was never set. So
the total size of the cache was never limited. Now when a pool is created, if
these objects may be cached, we set the corresponding objects size in the pool
cache.

This patch must be backported to 2.0 and 1.9.

(cherry picked from commit 2f6d3c0d65f09c342612d1b69198e23773fb7520)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed