Commit 06feff48 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Increase maximum code space to 2GB

This bumps the engine-wide limit for generated machine code from 1GB to
2GB. This will allow compiling (and debugging) bigger modules, as they
occur particularly in the debugging use case because the module will be
unoptimized then.

The limit per allocated code space is left at 1024MB (1GB), so a module
will need to allocate two separate code spaces to make use of the full
2GB code space.

R=ecmziegler@chromium.org

Bug: chromium:1117033, chromium:1114093, chromium:1107649, chromium:1111266
Change-Id: Iab95b3130cbacc21ba078bf0d4ee2d6cd121d675
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2372604Reviewed-by: 's avatarEmanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69548}
parent 45c67da2
......@@ -186,13 +186,17 @@ constexpr int kElidedFrameSlots = 0;
#endif
constexpr int kDoubleSizeLog2 = 3;
constexpr size_t kMaxWasmCodeMB = 1024;
constexpr size_t kMaxWasmCodeMB = 2048;
constexpr size_t kMaxWasmCodeMemory = kMaxWasmCodeMB * MB;
#if V8_TARGET_ARCH_ARM64
// ARM64 only supports direct calls within a 128 MB range.
constexpr size_t kMaxWasmCodeSpaceSize = 128 * MB;
#else
constexpr size_t kMaxWasmCodeSpaceSize = kMaxWasmCodeMemory;
// Use 1024 MB limit for code spaces on other platforms. This is smaller than
// the total allowed code space (kMaxWasmCodeMemory) to avoid unnecessarily big
// reservations, and to ensure that distances within a code space fit within a
// 32-bit signed integer.
constexpr size_t kMaxWasmCodeSpaceSize = 1024 * MB;
#endif
#if V8_HOST_ARCH_64_BIT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment