Skip to content

Commit

Permalink
cli: allow --huge-max-old-generation-size in NODE_OPTIONS
Browse files Browse the repository at this point in the history
PR-URL: #32251
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
  • Loading branch information
addaleax authored and targos committed Apr 28, 2020
1 parent 43e9ae8 commit e67b97e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/api/cli.md
Expand Up @@ -1220,6 +1220,7 @@ V8 options that are allowed are:
<!-- node-options-v8 start -->
* `--abort-on-uncaught-exception`
* `--disallow-code-generation-from-strings`
* `--huge-max-old-generation-size`
* `--interpreted-frames-native-stack`
* `--jitless`
* `--max-old-space-size`
Expand Down
5 changes: 5 additions & 0 deletions src/node_options.cc
Expand Up @@ -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{},
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-cli-node-options.js
Expand Up @@ -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',
Expand Down

0 comments on commit e67b97e

Please sign in to comment.