Skip to content

Commit 6212b19

Browse files
addaleaxtargos
authored andcommitted
cli: allow --huge-max-old-generation-size in NODE_OPTIONS
PR-URL: nodejs#32251 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: David Carlier <[email protected]>
1 parent a22a9e0 commit 6212b19

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

doc/api/cli.md

+1
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,7 @@ V8 options that are allowed are:
12191219
<!-- node-options-v8 start -->
12201220
* `--abort-on-uncaught-exception`
12211221
* `--disallow-code-generation-from-strings`
1222+
* `--huge-max-old-generation-size`
12221223
* `--interpreted-frames-native-stack`
12231224
* `--jitless`
12241225
* `--max-old-space-size`

src/node_options.cc

+5
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,11 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
578578
"disallow eval and friends",
579579
V8Option{},
580580
kAllowedInEnvironment);
581+
AddOption("--huge-max-old-generation-size",
582+
"increase default maximum heap size on machines with 16GB memory "
583+
"or more",
584+
V8Option{},
585+
kAllowedInEnvironment);
581586
AddOption("--jitless",
582587
"disable runtime allocation of executable memory",
583588
V8Option{},

test/parallel/test-cli-node-options.js

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ if (common.hasCrypto) {
6767
// V8 options
6868
expect('--abort_on-uncaught_exception', 'B\n');
6969
expect('--disallow-code-generation-from-strings', 'B\n');
70+
expect('--huge-max-old-generation-size', 'B\n');
7071
expect('--jitless', 'B\n');
7172
expect('--max-old-space-size=0', 'B\n');
7273
expect('--stack-trace-limit=100',

0 commit comments

Comments
 (0)