• Samuel Groß's avatar
    Implement DetermineAddressSpaceLimit() on x64 · 571eca5c
    Samuel Groß authored
    This function tries to determine the number of virtual address bits
    available on the current CPU and with that the maximum size of the
    userspace address space. On x64, it can be implemented through CPUID.
    
    The result of this function is now used in two ways: first, it limits
    the maximum size of the virtual memory cage, currently to a quarter of
    the address space. Second, it influences the placement of fake cages,
    which are attempted to be placed into the lower half of the address
    space so that they are followed by large amounts of (hopefully) unused
    but addressable virtual memory in which pages can be allocated.
    
    Bug: chromium:1218005
    Change-Id: I0edc5d241d899f16dbc47492fa1534b6aaa4aa13
    Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3220348
    Commit-Queue: Samuel Groß <saelo@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77393}
    571eca5c
v8-internal.h 23.2 KB