• Nils Goroll's avatar
    New region alloc · a0e8e8f7
    Nils Goroll authored
    upfront: This is not the segment allocation, which uses parts of the busy
    obj region allocation, and is mostly motivated by how much data we need
    to have in RAM at minimum.
    
    For the region allocation, we have conflicting goals:
    
    - To keep the log short, we want to use the least number of regions
    - To reduce fragmentation, we want to use the largest possible
      allocations
    - To use space efficiently, we want to split regions into power of
      two allocations.
    
    Also, for chunked encoding, we do not have an upper limit of
    how much space we are going to need, so we have to use the
    estimate provided by fellow_busy_obj_getspace(). It can not
    guess more than objsize_max.
    
    The new region alloc algorithm takes this compromise:
    
    - For the base case that we ran out of available regions (220), we
      allocate all we need without cramming.
    - Otherwise if we need less than a chunk, we request it
    - Otherwise if we know the size, we round down to a power of two
    - Otherwise we round up
    
    We then allow any cramming down to the chunk size, because that
    is what our LRU reservation uses.
    a0e8e8f7
Name
Last commit
Last update
LICENSES Loading commit data...
src Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
CHANGES.rst Loading commit data...
COPYING Loading commit data...
DEVELOPER.rst Loading commit data...
INSTALL.rst Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
bootstrap Loading commit data...
configure.ac Loading commit data...