Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    b29b68d6
    mempool: fix corruption with almost-page-sized objects · b29b68d6
    Avi Kivity authored
    When we free the last object in a page, we free the page itself, removing
    it from the pool's page list.  However, pages with no free objects are not
    present on the free page list, causing corruption.
    
    The only condition this can happen is if there is exactly one object on a
    page; so it's simultaneously the last allocated and the last freed object.
    b29b68d6
    History
    mempool: fix corruption with almost-page-sized objects
    Avi Kivity authored
    When we free the last object in a page, we free the page itself, removing
    it from the pool's page list.  However, pages with no free objects are not
    present on the free page list, causing corruption.
    
    The only condition this can happen is if there is exactly one object on a
    page; so it's simultaneously the last allocated and the last freed object.