• Bill Budge's avatar
    [Memory] Add an OnCriticalMemoryPressure method to V8::Platform. · 3f90d9f9
    Bill Budge authored
    Adds virtual V8::Platform::OnCriticalMemoryPressure method, default
    implementation does nothing.
    
    Calls this method on first allocation failures in NewArray, Malloced,
    and zone AccountingAllocator and adds retry logic.
    
    Adds utility functions for allocating base::VirtualMemory to functions
    in allocation.h, which call this method and add retry logic.
    
    Calls these utility functions in heap CodeRange, Spaces, StoreBuffer
    and SequentialMarkingDeque.
    
    Bug: v8:6635
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
    Change-Id: I38afd394f3be556aca037d16675e9884658158cb
    Reviewed-on: https://chromium-review.googlesource.com/583543
    Commit-Queue: Bill Budge <bbudge@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46988}
    3f90d9f9
test-allocation.cc 7.15 KB