Definition at line 60 of file Pool.h.
- Main cleanup handler. For MemPools to stay within upper idle limits, this function needs to be called periodically, preferably at some constant rate, eg. from Squid event. It looks through all pools and chunks, cleans up internal states and checks for releasable chunks.
- Between the calls to this function objects are placed onto internal cache instead of returning to their home chunks, mainly for speedup purpose. During that time state of chunk is not known, it is not known whether chunk is free or in use. This call returns all objects to their chunks and restores consistency.
- Should be called relatively often, as it sorts chunks in suitable order as to reduce free memory fragmentation and increase chunk utilisation. Suitable frequency for cleanup is in range of few tens of seconds to few minutes, depending of memory activity.
TODO: DOCS: Re-write this shorter!
|maxage||Release all totally idle chunks that have not been referenced for maxage seconds. |
Definition at line 105 of file Pool.cc.
References Mem::Meter::currentLevel(), flushMeters(), Mem::PoolMeter::idle, idleLimit(), pools, and TheMeter.
Referenced by Mem::CleanIdlePools(), and memClean().