• Samuel Groß's avatar
    Add PageInitializationMode enum for the BoundedPageAllocator · 18c37d32
    Samuel Groß authored
    Currently, when compiling with V8_VIRTUAL_MEMORY_CAGE enabled, the
    behavior of the BoundedPageAllocator changes from simply making freed
    pages inaccessible to decommitting them, which guarantees that they will
    be zero-initialized after the next allocation. As this seems to cause
    some performance regressions on Mac, this CL introduces a new enum that
    specifies how the allocator should behave:
    kAllocatedPagesMustBeZeroInitialized causes the pages to be decommitted
    during FreePages() and ReleasePages() and thus guarantees
    zero-initialization during AllocPages().
    kAllocatedPagesCanBeUninitialized only causes the pages to be made
    inaccessible, and so does not generally guarantee zero-initialization
    for AllocPages().
    
    Finally, this CL also removes some dead code in allocation.cc.
    
    Bug: chromium:1257089
    Change-Id: I53fa52c8913df869bee2b536efe252780d1ad893
    Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3208812
    Commit-Queue: Samuel Groß <saelo@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77285}
    18c37d32
accounting-allocator.cc 4.48 KB