src: add percentage support to --max-old-space-size by Asaf-Federman · Pull Request #59082 · nodejs/node
added
c++
labels
This commit adds support for specifying --max-old-space-size as a percentage of system memory, in addition to the existing MB format. A new HandleMaxOldSpaceSizePercentage method parses percentage values, validates that they are within the 0-100% range, and provides clear error messages for invalid input. The heap size is now calculated based on available system memory when a percentage is used. Test coverage has been added for both valid and invalid cases. Documentation and the JSON schema for CLI options have been updated with examples for both formats. Refs: nodejs#57447
Asaf-Federman added a commit to Asaf-Federman/node that referenced this pull request
This commit adds support for specifying --max-old-space-size as a percentage of system memory, in addition to the existing MB format. A new HandleMaxOldSpaceSizePercentage method parses percentage values, validates that they are within the 0-100% range, and provides clear error messages for invalid input. The heap size is now calculated based on available system memory when a percentage is used. Test coverage has been added for both valid and invalid cases. Documentation and the JSON schema for CLI options have been updated with examples for both formats. Refs: nodejs#57447 PR-URL: nodejs#59082 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: theanarkh <theratliter@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
richardlau
added
the
semver-minor
label
Asaf-Federman added a commit to Asaf-Federman/node that referenced this pull request
This commit adds support for specifying --max-old-space-size as a percentage of system memory, in addition to the existing MB format. A new HandleMaxOldSpaceSizePercentage method parses percentage values, validates that they are within the 0-100% range, and provides clear error messages for invalid input. The heap size is now calculated based on available system memory when a percentage is used. Test coverage has been added for both valid and invalid cases. Documentation and the JSON schema for CLI options have been updated with examples for both formats. Refs: nodejs#57447 PR-URL: nodejs#59082 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: theanarkh <theratliter@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Asaf-Federman added a commit to Asaf-Federman/node that referenced this pull request
This commit adds support for specifying --max-old-space-size as a percentage of system memory, in addition to the existing MB format. A new HandleMaxOldSpaceSizePercentage method parses percentage values, validates that they are within the 0-100% range, and provides clear error messages for invalid input. The heap size is now calculated based on available system memory when a percentage is used. Test coverage has been added for both valid and invalid cases. Documentation and the JSON schema for CLI options have been updated with examples for both formats. Refs: nodejs#57447 PR-URL: nodejs#59082 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: theanarkh <theratliter@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
aduh95 pushed a commit that referenced this pull request
This commit adds support for specifying --max-old-space-size as a percentage of system memory, in addition to the existing MB format. A new HandleMaxOldSpaceSizePercentage method parses percentage values, validates that they are within the 0-100% range, and provides clear error messages for invalid input. The heap size is now calculated based on available system memory when a percentage is used. Test coverage has been added for both valid and invalid cases. Documentation and the JSON schema for CLI options have been updated with examples for both formats. Refs: #57447 PR-URL: #59082 Backport-PR-URL: #59631 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: theanarkh <theratliter@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
aduh95 added a commit that referenced this pull request
aduh95 added a commit that referenced this pull request
aduh95 added a commit that referenced this pull request
Notable changes: cli: * (SEMVER-MINOR) add `--use-env-proxy` (Joyee Cheung) #59151 http: * (SEMVER-MINOR) support http proxy for fetch under `NODE_USE_ENV_PROXY` (Joyee Cheung) #57165 * (SEMVER-MINOR) add `shouldUpgradeCallback` to let servers control HTTP upgrades (Tim Perry) #59824 http,https: * (SEMVER-MINOR) add built-in proxy support in `http`/`https.request` and `Agent` (Joyee Cheung) #58980 src: * (SEMVER-MINOR) add percentage support to `--max-old-space-size` (Asaf Federman) #59082 PR-URL: #60230
aduh95 added a commit that referenced this pull request
Notable changes: cli: * (SEMVER-MINOR) add `--use-env-proxy` (Joyee Cheung) #59151 http: * (SEMVER-MINOR) support http proxy for fetch under `NODE_USE_ENV_PROXY` (Joyee Cheung) #57165 * (SEMVER-MINOR) add `shouldUpgradeCallback` to let servers control HTTP upgrades (Tim Perry) #59824 http,https: * (SEMVER-MINOR) add built-in proxy support in `http`/`https.request` and `Agent` (Joyee Cheung) #58980 src: * (SEMVER-MINOR) add percentage support to `--max-old-space-size` (Asaf Federman) #59082 PR-URL: #60230
aduh95 added a commit that referenced this pull request
Notable changes: cli: * (SEMVER-MINOR) add `--use-env-proxy` (Joyee Cheung) #59151 http: * (SEMVER-MINOR) support http proxy for fetch under `NODE_USE_ENV_PROXY` (Joyee Cheung) #57165 * (SEMVER-MINOR) add `shouldUpgradeCallback` to let servers control HTTP upgrades (Tim Perry) #59824 http,https: * (SEMVER-MINOR) add built-in proxy support in `http`/`https.request` and `Agent` (Joyee Cheung) #58980 src: * (SEMVER-MINOR) add percentage support to `--max-old-space-size` (Asaf Federman) #59082 PR-URL: #60230
jkleinsc added a commit to electron/electron that referenced this pull request
* chore: bump node in DEPS to v22.21.0 * chore: bump node in DEPS to v22.21.1 * chore: update patches * fixup patches/node/api_remove_deprecated_getisolate.patch * src: add percentage support to --max-old-space-size nodejs/node#59082 (cherry picked from commit 851df7e) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
codebytere pushed a commit to electron/electron that referenced this pull request
* chore: bump node in DEPS to v22.21.0 * chore: bump node in DEPS to v22.21.1 * chore: update patches * lib,src: refactor assert to load error source from memory nodejs/node#59751 * src: add percentage support to --max-old-space-size nodejs/node#59082 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
ckerr pushed a commit to electron/electron that referenced this pull request
* chore: bump node in DEPS to v22.21.0 * chore: bump node in DEPS to v22.21.1 * chore: update patches * lib,src: refactor assert to load error source from memory nodejs/node#59751 * src: add percentage support to --max-old-space-size nodejs/node#59082 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>