diff --git a/doc/api/cli.md b/doc/api/cli.md index 28615b12fbba0b..80eb48e1e1dcf1 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1220,6 +1220,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 b08060b3e5479e..3e78c65e5b9f1f 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -609,6 +609,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',