Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    a6b6db7f
    mempool: fix memory leak when a pool page become free · a6b6db7f
    Avi Kivity authored
    We currently leak a pool page, because we cannot unlink the free objects
    belonging to the page from the pool's free list.
    
    Fix by having a per-page free list (containing objects only from that page).
    The pages are themselves placed on a doubly linked list.  When we identify
    an empty page, we can now easily drop it since the local free list only
    point within the page.
    a6b6db7f
    History
    mempool: fix memory leak when a pool page become free
    Avi Kivity authored
    We currently leak a pool page, because we cannot unlink the free objects
    belonging to the page from the pool's free list.
    
    Fix by having a per-page free list (containing objects only from that page).
    The pages are themselves placed on a doubly linked list.  When we identify
    an empty page, we can now easily drop it since the local free list only
    point within the page.