GeezerVison is showing github.com — test,doc: skip --max-old-space-size-percentage on 32-bit platforms · nodejs/node@660d573
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/cli.md +6-3Lines changed: 6 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1702,14 +1702,17 @@ changes: |
1702 | 1702 |
|
1703 | 1703 | Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB. |
1704 | 1704 |
|
1705 | | -### `--max-old-space-size-percentage=PERCENTAGE` |
| 1705 | +### `--max-old-space-size-percentage=percentage` |
1706 | 1706 |
|
1707 | | -Sets the max memory size of V8's old memory section as a percentage of available system memory. |
| 1707 | +Sets the maximum memory size of V8's old memory section as a percentage of available system memory. |
1708 | 1708 | This flag takes precedence over `--max-old-space-size` when both are specified. |
1709 | 1709 |
|
1710 | | -The `PERCENTAGE` parameter must be a number greater than 0 and up to 100. representing the percentage |
| 1710 | +The `percentage` parameter must be a number greater than 0 and up to 100, representing the percentage |
1711 | 1711 | of available system memory to allocate to the V8 heap. |
1712 | 1712 |
|
| 1713 | +**Note:** This flag utilizes `--max-old-space-size`, which may be unreliable on 32-bit platforms due to |
| 1714 | +integer overflow issues. |
| 1715 | + |
1713 | 1716 | ```bash |
1714 | 1717 | # Using 50% of available system memory |
1715 | 1718 | node --max-old-space-size-percentage=50 index.js |
|
Collapse file
Copy file name to clipboardExpand all lines: doc/node.1 +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -347,14 +347,18 @@ The file used to store localStorage data. |
347 | 347 | Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB. |
348 | 348 | . |
349 | 349 | .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. |
351 | 351 | This flag takes precedence over |
352 | 352 | .Fl -max-old-space-size |
353 | 353 | when both are specified. |
354 | 354 | The |
355 | 355 | .Ar percentage |
356 | 356 | parameter must be a number greater than 0 and up to 100, representing the percentage |
357 | 357 | 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. |
358 | 362 | . |
359 | 363 | .It Fl -napi-modules |
360 | 364 | This option is a no-op. |
|
Collapse file
Copy file name to clipboardExpand all lines: test/parallel/test-max-old-space-size-percentage.js +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 |
|
3 | 3 | // This test validates the --max-old-space-size-percentage flag functionality |
4 | 4 |
|
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 | + |
6 | 10 | const assert = require('node:assert'); |
7 | 11 | const { spawnSync } = require('child_process'); |
8 | 12 | const os = require('os'); |
|