• Anton Bikineev's avatar
    cppgc: Fix caged-heap reservation when pointer compression is enabled · ae41f7df
    Anton Bikineev authored
    Currently, PageAllocator assumes that FreePages(start, size) will always
    be called on the same region that was passed to AllocatePages(start,
    size). This assumption is made in:
    1) leak-sanitizer (LsanPageAllocator) that checks it explicitly,
    2) on Windows, FreePages() calls VirtualFree() with zero-size and
       MEM_RELEASE, which causes the entire reservation to be freed.
    
    The CL temporarily fixes the bot failures just by holding the unneeded
    half and adds a TODO to return the unneded part back to the OS.
    
    Bug: chromium:1325007
    Change-Id: I2bd878876d43d693cf2138020f410ffe1615b4e9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695363Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Anton Bikineev <bikineev@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#81059}
    ae41f7df
virtual-memory.cc 1.6 KB