mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00: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
cc3a70598c
commit
538a00c0f6
@ -1685,14 +1685,17 @@ changes:
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
**Note:** This flag utilizes `--max-old-space-size`, which may be unreliable on 32-bit platforms due to
|
||||
integer overflow issues.
|
||||
|
||||
```bash
|
||||
# Using 50% of available system memory
|
||||
node --max-old-space-size-percentage=50 index.js
|
||||
|
||||
@ -333,7 +333,7 @@ The file used to store localStorage data.
|
||||
Specify the maximum size of HTTP headers in bytes. Defaults to 16 KiB.
|
||||
.
|
||||
.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
|
||||
.Fl -max-old-space-size
|
||||
when both are specified.
|
||||
@ -341,6 +341,10 @@ The
|
||||
.Ar 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.
|
||||
.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
|
||||
This option is a no-op.
|
||||
|
||||
@ -2,7 +2,11 @@
|
||||
|
||||
// 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 { spawnSync } = require('child_process');
|
||||
const os = require('os');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user