From 6d3e0bb72b7c505d6141338f8ad2505d61ac2eef Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 13 Mar 2020 17:28:19 +0100 Subject: [PATCH] cli: allow --huge-max-old-generation-size in NODE_OPTIONS --- doc/api/cli.md | 1 + src/node_options.cc | 5 +++++ test/parallel/test-cli-node-options.js | 1 + 3 files changed, 7 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 66cb665fa82e9f..c152b005f6e031 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1167,6 +1167,7 @@ V8 options that are allowed are: * `--abort-on-uncaught-exception` * `--disallow-code-generation-from-strings` +* `--huge-max-old-generation-size` * `--interpreted-frames-native-stack` * `--jitless` * `--max-old-space-size` diff --git a/src/node_options.cc b/src/node_options.cc index 3bf1031f1667ba..56839316e083ad 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -616,6 +616,11 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( "disallow eval and friends", V8Option{}, kAllowedInEnvironment); + AddOption("--huge-max-old-generation-size", + "increase default maximum heap size on machines with 16GB memory " + "or more", + V8Option{}, + kAllowedInEnvironment); AddOption("--jitless", "disable runtime allocation of executable memory", V8Option{}, diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 0bbe4c9eae1ba2..2fc22ca477ce94 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -67,6 +67,7 @@ if (common.hasCrypto) { // V8 options expect('--abort_on-uncaught_exception', 'B\n'); expect('--disallow-code-generation-from-strings', 'B\n'); +expect('--huge-max-old-generation-size', 'B\n'); expect('--jitless', 'B\n'); expect('--max-old-space-size=0', 'B\n'); expect('--stack-trace-limit=100',