Repository: nodejs/node
Pull request: test,doc: skip --max-old-space-size-percentage on 32-bit platforms

This pull request skip testing the --max-old-space-size-percentage flag on 32-bit platforms. The flag, which sets the maximum memory size of V8's old memory section as a percentage of available system memory, may cause integer overflow issues on 32-bit systems. The documentation have been updated to clarify its behavior and limitations on 32-bit systems.

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: doc/api/cli.md
patch: @@ -1765,14 +1765,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

filename: doc/node.1
patch: @@ -339,14 +339,18 @@ 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.
 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.

filename: test/parallel/test-max-old-space-size-percentage.js
patch: @@ -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');