-
Igor Sheludko authored
Windows requires additional writable page to be allocated in front of the code range, but at the same time the code range must not cross 4 GB boundary in order to make Code pointer compression work for Code pointers. All these constraints make the logic of hint calculation too dependent on what VirtualMemoryCage::InitReservation() would do with the provided hint. This CL simplifies the hint calculation and fully relies on VirtualMemoryCage::InitReservation() to do the right thing. On Linux the implementation of OS::GetFreeMemoryRangesWithin() doesn't work when Chromium sandbox is enabled, so we use the beginning of the preferred short builtin calls region as a hint. It should be at least as good as the fallback hint but with higher chances to point to free address space location. Bug: v8:11880 Change-Id: I0b6ebec98dd0cf483f67e6ba8a919deb9ce7cc25 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3380585Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78568}
4ecd70a2