• Darius Mercadier's avatar
    Fix allocation of tiniest object in the tiny freelist · 05e98e56
    Darius Mercadier authored
    When trying to find a spot in the freelists for a tiniest object,
    the tiny freelist was never searched.
    
    This was fixed by modifying FreeList::Allocate in order to handle
    that special case.
    A test was added in cctest/heap/test-spaces.cc. It allocates a
    Tiny object on a new page, then fills up the page, then frees the
    first object, and finally tries to allocate a Tiniest
    object. Before, this Tiniest object would go on a different page;
    now it goes on the same one (which is what the test checks for).
    
    Bug: v8:9329
    Change-Id: Ia810726d1bfe1dae4ef2055a7f5b314b1514ee9c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647162
    Commit-Queue: Darius Mercadier <dmercadier@google.com>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62055}
    05e98e56
spaces.h 109 KB