blob: 56e93c50cfe6d7c0b6386ac375ca38fb64167381 [file] [log] [blame]
Andrew Geisslerf103a7f2021-05-07 16:09:40 -05001Description: mksnapshot uses too much memory on 32-bit mipsel
2Author: Jérémy Lal <kapouer@melix.org>
3Last-Update: 2020-06-03
4Forwarded: https://bugs.chromium.org/p/v8/issues/detail?id=10586
5
6This ensures that we reserve 500M instead of 2G range for codegen
7ensures that qemu-mips can allocate such large ranges
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11--- a/deps/v8/src/common/globals.h
12+++ b/deps/v8/src/common/globals.h
13@@ -224,7 +224,7 @@ constexpr size_t kMinimumCodeRangeSize =
14 constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux
15 #elif V8_TARGET_ARCH_MIPS
16 constexpr bool kPlatformRequiresCodeRange = false;
17-constexpr size_t kMaximalCodeRangeSize = 2048LL * MB;
18+constexpr size_t kMaximalCodeRangeSize = 512 * MB;
19 constexpr size_t kMinimumCodeRangeSize = 0 * MB;
20 constexpr size_t kMinExpectedOSPageSize = 4 * KB; // OS page.
21 #else
22--- a/deps/v8/src/codegen/mips/constants-mips.h
23+++ b/deps/v8/src/codegen/mips/constants-mips.h
24@@ -140,7 +140,7 @@ const uint32_t kLeastSignificantByteInIn
25 namespace v8 {
26 namespace internal {
27
28-constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096;
29+constexpr size_t kMaxPCRelativeCodeRangeInMB = 1024;
30
31 // -----------------------------------------------------------------------------
32 // Registers and FPURegisters.