Skip to content
Snippets Groups Projects
Commit c549e0e8 authored by Avi Kivity's avatar Avi Kivity
Browse files

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.
parent a76e1813
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment