commit | 91a8e28f90e4b31cd15ac8e6a6e700ff73decbf0 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sun Jan 02 00:21:46 2022 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Sun Jan 02 19:35:26 2022 +0100 |
tree | d49a3c8ec32c01e3881a637a4e112a64f8797e19 | |
parent | c16ed3b090df1d8452d4dea85400d9100f89e712 [diff] |
MINOR: pool: add a function to estimate how many may be released at once At the moment we count the number of releasable objects to a shared pool one by one. The way the formula is made allows to pre-compute the number of available slots, so let's add a function for that so that callers can do it once before iterating. This takes into account the average number of entries needed and the minimum availability per pool. The function is not used yet.