Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    c549e0e8
    mempool: add hysteresis · c549e0e8
    Avi Kivity authored
    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.
    c549e0e8
    History
    mempool: add hysteresis
    Avi Kivity authored
    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.