Skip to content

Commit 41f02f6

Browse files
committed
test,doc: skip --max-old-space-size-percentage on 32-bit platforms
PR-URL: #60144 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent e309fc2 commit 41f02f6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

doc/api/cli.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,14 +1699,17 @@ changes:
16991699

17001700
Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB.
17011701

1702-
### `--max-old-space-size-percentage=PERCENTAGE`
1702+
### `--max-old-space-size-percentage=percentage`
17031703

1704-
Sets the max memory size of V8's old memory section as a percentage of available system memory.
1704+
Sets the maximum memory size of V8's old memory section as a percentage of available system memory.
17051705
This flag takes precedence over `--max-old-space-size` when both are specified.
17061706

1707-
The `PERCENTAGE` parameter must be a number greater than 0 and up to 100. representing the percentage
1707+
The `percentage` parameter must be a number greater than 0 and up to 100, representing the percentage
17081708
of available system memory to allocate to the V8 heap.
17091709

1710+
**Note:** This flag utilizes `--max-old-space-size`, which may be unreliable on 32-bit platforms due to
1711+
integer overflow issues.
1712+
17101713
```bash
17111714
# Using 50% of available system memory
17121715
node --max-old-space-size-percentage=50 index.js

doc/node.1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,18 @@ The file used to store localStorage data.
347347
Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.
348348
.
349349
.It Fl -max-old-space-size-percentage Ns = Ns Ar percentage
350-
Sets the max memory size of V8's old memory section as a percentage of available system memory.
350+
Sets the maximum memory size of V8's old memory section as a percentage of available system memory.
351351
This flag takes precedence over
352352
.Fl -max-old-space-size
353353
when both are specified.
354354
The
355355
.Ar percentage
356356
parameter must be a number greater than 0 and up to 100, representing the percentage
357357
of available system memory to allocate to the V8 heap.
358+
.Pp
359+
Note: This flag utilizes
360+
.Fl -max-old-space-size ,
361+
which may be unreliable on 32-bit platforms due to integer overflow issues.
358362
.
359363
.It Fl -napi-modules
360364
This option is a no-op.

0 commit comments

Comments
 (0)