mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
test,doc: skip --max-old-space-size-percentage on 32-bit platforms
PR-URL: https://github.com/nodejs/node/pull/60144 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
db0121bedd
commit
ad2c1bf62e
|
|
@ -1765,14 +1765,17 @@ changes:
|
||||||
|
|
||||||
Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB.
|
Specify the maximum size, in bytes, of HTTP headers. Defaults to 16 KiB.
|
||||||
|
|
||||||
### `--max-old-space-size-percentage=PERCENTAGE`
|
### `--max-old-space-size-percentage=percentage`
|
||||||
|
|
||||||
Sets the max memory size of V8's old memory section as a percentage of available system memory.
|
Sets the maximum memory size of V8's old memory section as a percentage of available system memory.
|
||||||
This flag takes precedence over `--max-old-space-size` when both are specified.
|
This flag takes precedence over `--max-old-space-size` when both are specified.
|
||||||
|
|
||||||
The `PERCENTAGE` parameter must be a number greater than 0 and up to 100. representing the percentage
|
The `percentage` parameter must be a number greater than 0 and up to 100, representing the percentage
|
||||||
of available system memory to allocate to the V8 heap.
|
of available system memory to allocate to the V8 heap.
|
||||||
|
|
||||||
|
**Note:** This flag utilizes `--max-old-space-size`, which may be unreliable on 32-bit platforms due to
|
||||||
|
integer overflow issues.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Using 50% of available system memory
|
# Using 50% of available system memory
|
||||||
node --max-old-space-size-percentage=50 index.js
|
node --max-old-space-size-percentage=50 index.js
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ The file used to store localStorage data.
|
||||||
Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.
|
Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.
|
||||||
.
|
.
|
||||||
.It Fl -max-old-space-size-percentage Ns = Ns Ar percentage
|
.It Fl -max-old-space-size-percentage Ns = Ns Ar percentage
|
||||||
Sets the max memory size of V8's old memory section as a percentage of available system memory.
|
Sets the maximum memory size of V8's old memory section as a percentage of available system memory.
|
||||||
This flag takes precedence over
|
This flag takes precedence over
|
||||||
.Fl -max-old-space-size
|
.Fl -max-old-space-size
|
||||||
when both are specified.
|
when both are specified.
|
||||||
|
|
@ -347,6 +347,10 @@ The
|
||||||
.Ar percentage
|
.Ar percentage
|
||||||
parameter must be a number greater than 0 and up to 100, representing the percentage
|
parameter must be a number greater than 0 and up to 100, representing the percentage
|
||||||
of available system memory to allocate to the V8 heap.
|
of available system memory to allocate to the V8 heap.
|
||||||
|
.Pp
|
||||||
|
Note: This flag utilizes
|
||||||
|
.Fl -max-old-space-size ,
|
||||||
|
which may be unreliable on 32-bit platforms due to integer overflow issues.
|
||||||
.
|
.
|
||||||
.It Fl -napi-modules
|
.It Fl -napi-modules
|
||||||
This option is a no-op.
|
This option is a no-op.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,11 @@
|
||||||
|
|
||||||
// This test validates the --max-old-space-size-percentage flag functionality
|
// This test validates the --max-old-space-size-percentage flag functionality
|
||||||
|
|
||||||
require('../common');
|
const common = require('../common');
|
||||||
|
// This flag utilizes --max-old-space-size, which is unreliable on
|
||||||
|
// 32-bit platforms due to integer overflow issues.
|
||||||
|
common.skipIf32Bits();
|
||||||
|
|
||||||
const assert = require('node:assert');
|
const assert = require('node:assert');
|
||||||
const { spawnSync } = require('child_process');
|
const { spawnSync } = require('child_process');
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user