Skip to content

Commit fd4d6b3

Browse files
alexandre-abriouxtpoisseau
authored andcommitted
doc: clarify --max-old-space-size and --max-semi-space-size units
PR-URL: nodejs#54477 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ulises Gascón <[email protected]>
1 parent 1636c30 commit fd4d6b3

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

doc/api/cli.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,11 @@ documented here:
34523452

34533453
### `--perf-prof-unwinding-info`
34543454

3455-
### `--max-old-space-size=SIZE` (in megabytes)
3455+
<!-- Anchor to make sure old links find a target -->
3456+
3457+
<a id="--max-old-space-sizesize-in-megabytes"></a>
3458+
3459+
### `--max-old-space-size=SIZE` (in MiB)
34563460

34573461
Sets the max memory size of V8's old memory section. As memory
34583462
consumption approaches the limit, V8 will spend more time on
@@ -3465,10 +3469,14 @@ On a machine with 2 GiB of memory, consider setting this to
34653469
node --max-old-space-size=1536 index.js
34663470
```
34673471

3468-
### `--max-semi-space-size=SIZE` (in megabytes)
3472+
<!-- Anchor to make sure old links find a target -->
3473+
3474+
<a id="--max-semi-space-sizesize-in-megabytes"></a>
3475+
3476+
### `--max-semi-space-size=SIZE` (in MiB)
34693477

34703478
Sets the maximum [semi-space][] size for V8's [scavenge garbage collector][] in
3471-
MiB (megabytes).
3479+
MiB (mebibytes).
34723480
Increasing the max size of a semi-space may improve throughput for Node.js at
34733481
the cost of more memory consumption.
34743482

doc/api/worker_threads.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,8 +1500,8 @@ thread spawned will spawn another until the application crashes.
15001500
[`'close'` event]: #event-close
15011501
[`'exit'` event]: #event-exit
15021502
[`'online'` event]: #event-online
1503-
[`--max-old-space-size`]: cli.md#--max-old-space-sizesize-in-megabytes
1504-
[`--max-semi-space-size`]: cli.md#--max-semi-space-sizesize-in-megabytes
1503+
[`--max-old-space-size`]: cli.md#--max-old-space-sizesize-in-mib
1504+
[`--max-semi-space-size`]: cli.md#--max-semi-space-sizesize-in-mib
15051505
[`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
15061506
[`AsyncResource`]: async_hooks.md#class-asyncresource
15071507
[`Buffer.allocUnsafe()`]: buffer.md#static-method-bufferallocunsafesize

0 commit comments

Comments
 (0)