• Darius Mercadier's avatar
    [heap] Refactor/fix freelist implementations · 72fed644
    Darius Mercadier authored
    A few methods (Free, TryFindInNode, SearchForNodeInList) were
    identical in each FreeList implementation, yet redefined each
    time. They are now defined in the class FreeList, and inherited by
    subclasses (which can override them if needed).
    
    Additionnaly, GuaranteedAllocatable in FreeListFast and FreeListMany
    were wrong in their respective last case; they are now fixed.
    
    Consequently to fixing FreeListMany::GuaranteedAllocatable,
    FreeListMany was slightly reworked:
      - The last freelist is now fully searched during allocation (rather
        than just looking at its first element like for the other
        freelists).
    
    Bug: v8:9329
    Change-Id: Ic86ade3b1acaa2ca91cce17bd6822ec12aa594d9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706478Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Darius Mercadier <dmercadier@google.com>
    Cr-Commit-Position: refs/heads/master@{#62845}
    72fed644
spaces.h 111 KB