node/doc/api
Asaf Federman 0bbe7c36c9
src: add percentage support to --max-old-space-size
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: https://github.com/nodejs/node/issues/57447
PR-URL: https://github.com/nodejs/node/pull/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>
2025-07-28 05:06:16 +00:00
..
addons.md doc: fix c++ addon hello world sample 2024-12-09 17:43:50 +00:00
assert.md doc: add missing <code> blocks 2025-07-10 18:02:06 +00:00
async_context.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
async_hooks.md doc,tools: enforce use of node: prefix 2024-07-21 15:44:27 +00:00
buffer.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
child_process.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
cli.md src: add percentage support to --max-old-space-size 2025-07-28 05:06:16 +00:00
cluster.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
console.md doc: add a note on console stream behavior 2024-11-02 12:37:09 +00:00
corepack.md doc: clarify future Corepack removal in v25+ 2025-04-14 03:25:03 +00:00
crypto.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
debugger.md inspector: introduce the --inspect-wait flag 2024-05-11 18:48:30 +00:00
deprecations.md crypto: runtime-deprecate default shake128/256 output lengths 2025-07-11 14:21:46 +00:00
dgram.md 2025-06-09, Version 24.2.0 (Current) 2025-06-09 23:45:29 +02:00
diagnostics_channel.md http2: add diagnostics channel 'http2.server.stream.close' 2025-06-11 11:57:51 +00:00
dns.md dns: support max timeout 2025-07-10 15:50:43 +00:00
documentation.md doc: clarify removal of experimental API does not require a deprecation 2024-11-08 13:02:49 +00:00
domain.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
embedding.md doc: improve c++ embedder API doc 2024-11-01 03:43:53 +00:00
environment_variables.md doc: add new environment variables doc page 2025-07-20 20:53:54 +00:00
errors.md cli: add --use-env-proxy 2025-07-26 20:43:10 +00:00
esm.md esm: unflag --experimental-wasm-modules 2025-07-22 13:24:06 -07:00
events.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
fs.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
globals.md worker: add web locks api 2025-07-18 07:55:10 -07:00
http.md cli: add --use-env-proxy 2025-07-26 20:43:10 +00:00
http2.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
https.md http,https: add built-in proxy support in http/https.request and Agent 2025-07-18 09:06:32 +02:00
index.md doc: add new environment variables doc page 2025-07-20 20:53:54 +00:00
inspector.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
intl.md doc: improve documentation about ICU data fallback 2023-09-22 13:24:23 +00:00
module.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
modules.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
n-api.md node-api,doc: update links to ecma262 with section names 2025-07-18 12:45:52 +00:00
net.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
os.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
packages.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
path.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
perf_hooks.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
permissions.md doc: remove broken link to permission model source code 2025-07-08 05:22:36 +00:00
process.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
punycode.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
querystring.md doc: get rid of unnecessary eslint-skip comments 2023-11-22 19:03:33 +00:00
quic.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
readline.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
repl.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
report.md 2025-01-07, Version 22.13.0 'Jod' (LTS) 2025-01-07 14:36:47 -05:00
single-executable-applications.md doc: make MDN links to global classes more consistent 2025-02-07 14:33:06 +00:00
sqlite.md doc: add missing section for setReturnArrays in sqlite.md 2025-07-17 17:57:08 +02:00
stream.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
string_decoder.md doc: add esm examples to node:string_decoder 2024-10-26 20:36:25 +00:00
synopsis.md doc: clarify explaination text on how to run the example 2023-10-06 13:37:31 +00:00
test.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
timers.md 2025-06-09, Version 24.2.0 (Current) 2025-06-09 23:45:29 +02:00
tls.md crypto: add tls.setDefaultCACertificates() 2025-07-18 19:57:53 +00:00
tracing.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
tty.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
typescript.md 2025-06-24, Version 24.3.0 (Current) 2025-06-24 19:39:30 -03:00
url.md doc: fix broken sentence in URL.parse 2025-07-24 11:48:38 +00:00
util.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
v8.md 2025-06-24, Version 22.17.0 'Jod' (LTS) 2025-06-25 02:08:38 +02:00
vm.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
wasi.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00
webcrypto.md 2025-06-23, Version 20.19.3 'Iron' (LTS) 2025-06-23 10:32:15 +02:00
webstreams.md doc: add node.js streams references to Web Streams doc 2025-03-18 19:22:10 +00:00
worker_threads.md worker: add web locks api 2025-07-18 07:55:10 -07:00
zlib.md doc: fix typed list formatting 2025-07-15 17:18:42 +00:00