Skip to content

Commit e67b97e

Browse files
addaleaxtargos
authored andcommitted
cli: allow --huge-max-old-generation-size in NODE_OPTIONS
PR-URL: #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 43e9ae8 commit e67b97e

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
@@ -1220,6 +1220,7 @@ V8 options that are allowed are:
12201220
<!-- node-options-v8 start -->
12211221
* `--abort-on-uncaught-exception`
12221222
* `--disallow-code-generation-from-strings`
1223+
* `--huge-max-old-generation-size`
12231224
* `--interpreted-frames-native-stack`
12241225
* `--jitless`
12251226
* `--max-old-space-size`

src/node_options.cc

+5
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,11 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
609609
"disallow eval and friends",
610610
V8Option{},
611611
kAllowedInEnvironment);
612+
AddOption("--huge-max-old-generation-size",
613+
"increase default maximum heap size on machines with 16GB memory "
614+
"or more",
615+
V8Option{},
616+
kAllowedInEnvironment);
612617
AddOption("--jitless",
613618
"disable runtime allocation of executable memory",
614619
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)