Skip to content
  • Maria Matejka's avatar
    9d03c3f5
    Memory pages are not munmapped, instead we just madvise() · 9d03c3f5
    Maria Matejka authored
    Memory unmapping causes slow address space fragmentation, leading in
    extreme cases to failing to allocate pages at all. Removing this problem
    by keeping all the pages allocated to us, yet calling madvise() to let
    kernel dispose of them.
    
    This adds a little complexity and overhead as we have to keep the
    pointers to the free pages, therefore to hold e.g. 1 GB of 4K pages with
    8B pointers, we have to store 2 MB of data.
    9d03c3f5
    Memory pages are not munmapped, instead we just madvise()
    Maria Matejka authored
    Memory unmapping causes slow address space fragmentation, leading in
    extreme cases to failing to allocate pages at all. Removing this problem
    by keeping all the pages allocated to us, yet calling madvise() to let
    kernel dispose of them.
    
    This adds a little complexity and overhead as we have to keep the
    pointers to the free pages, therefore to hold e.g. 1 GB of 4K pages with
    8B pointers, we have to store 2 MB of data.
Loading