Skip to content

Commit 8733b91

Browse files
committed
test,doc: skip --max-old-space-size-percentage on 32-bit platforms
1 parent dac7895 commit 8733b91

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

doc/api/cli.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,6 +1692,9 @@ This flag takes precedence over `--max-old-space-size` when both are specified.
16921692
The `PERCENTAGE` parameter must be a number greater than 0 and up to 100. representing the percentage
16931693
of available system memory to allocate to the V8 heap.
16941694

1695+
**Note:** This flag utilizes --max-old-space-size, which is unreliable on 32-bit platforms due to
1696+
integer overflow issues.
1697+
16951698
```bash
16961699
# Using 50% of available system memory
16971700
node --max-old-space-size-percentage=50 index.js

doc/node.1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ The
352352
.Ar percentage
353353
parameter must be a number greater than 0 and up to 100, representing the percentage
354354
of available system memory to allocate to the V8 heap.
355+
.Pp
356+
Note: This flag utilizes --max-old-space-size, which is unreliable on 32-bit platforms due to
357+
integer overflow issues.
355358
.
356359
.It Fl -napi-modules
357360
This option is a no-op.

test/parallel/test-max-old-space-size-percentage.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
// This test validates the --max-old-space-size-percentage flag functionality
44

5-
require('../common');
5+
const common = require('../common');
6+
// This flag utilizes --max-old-space-size, which is unreliable on
7+
// 32-bit platforms due to integer overflow issues.
8+
common.skipIf32Bits();
9+
610
const assert = require('node:assert');
711
const { spawnSync } = require('child_process');
812
const os = require('os');

0 commit comments

Comments
 (0)