mempool: add hysteresis
If we allocate and free just one object in an empty pool, we will continuously allocate a page, format it for the pool, then free it. This is wastefull, so allow the pool to keep one empty page. The page is kept at the back of the free list, so it won't get fragemented needlessly.
Please register or sign in to comment