Skip to content

Commit 27edff5

Browse files
authored
doc: fix the order of process.md sections
Fixes: #58402 PR-URL: #58403 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent cb88e99 commit 27edff5

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

doc/api/process.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,28 @@ $ bash -c 'exec -a customArgv0 ./node'
982982
'customArgv0'
983983
```
984984

985+
## `process.availableMemory()`
986+
987+
<!-- YAML
988+
added:
989+
- v22.0.0
990+
- v20.13.0
991+
changes:
992+
- version:
993+
- v24.0.0
994+
- v22.16.0
995+
pr-url: https://github.com/nodejs/node/pull/57765
996+
description: Change stability index for this feature from Experimental to Stable.
997+
-->
998+
999+
* {number}
1000+
1001+
Gets the amount of free memory that is still available to the process
1002+
(in bytes).
1003+
1004+
See [`uv_get_available_memory`][uv_get_available_memory] for more
1005+
information.
1006+
9851007
## `process.channel`
9861008

9871009
<!-- YAML
@@ -1157,28 +1179,6 @@ is unknown, `0` is returned.
11571179
See [`uv_get_constrained_memory`][uv_get_constrained_memory] for more
11581180
information.
11591181

1160-
## `process.availableMemory()`
1161-
1162-
<!-- YAML
1163-
added:
1164-
- v22.0.0
1165-
- v20.13.0
1166-
changes:
1167-
- version:
1168-
- v24.0.0
1169-
- v22.16.0
1170-
pr-url: https://github.com/nodejs/node/pull/57765
1171-
description: Change stability index for this feature from Experimental to Stable.
1172-
-->
1173-
1174-
* {number}
1175-
1176-
Gets the amount of free memory that is still available to the process
1177-
(in bytes).
1178-
1179-
See [`uv_get_available_memory`][uv_get_available_memory] for more
1180-
information.
1181-
11821182
## `process.cpuUsage([previousValue])`
11831183

11841184
<!-- YAML
@@ -1780,6 +1780,35 @@ that started the Node.js process. Symbolic links, if any, are resolved.
17801780
'/usr/local/bin/node'
17811781
```
17821782
1783+
## `process.execve(file[, args[, env]])`
1784+
1785+
<!-- YAML
1786+
added:
1787+
- v23.11.0
1788+
- v22.15.0
1789+
-->
1790+
1791+
> Stability: 1 - Experimental
1792+
1793+
* `file` {string} The name or path of the executable file to run.
1794+
* `args` {string\[]} List of string arguments. No argument can contain a null-byte (`\u0000`).
1795+
* `env` {Object} Environment key-value pairs.
1796+
No key or value can contain a null-byte (`\u0000`).
1797+
**Default:** `process.env`.
1798+
1799+
Replaces the current process with a new process.
1800+
1801+
This is achieved by using the `execve` POSIX function and therefore no memory or other
1802+
resources from the current process are preserved, except for the standard input,
1803+
standard output and standard error file descriptor.
1804+
1805+
All other resources are discarded by the system when the processes are swapped, without triggering
1806+
any exit or close events and without running any cleanup handler.
1807+
1808+
This function will never return, unless an error occurred.
1809+
1810+
This function is not available on Windows or IBM i.
1811+
17831812
## `process.exit([code])`
17841813
17851814
<!-- YAML
@@ -3360,35 +3389,6 @@ In custom builds from non-release versions of the source tree, only the
33603389
`name` property may be present. The additional properties should not be
33613390
relied upon to exist.
33623391
3363-
## `process.execve(file[, args[, env]])`
3364-
3365-
<!-- YAML
3366-
added:
3367-
- v23.11.0
3368-
- v22.15.0
3369-
-->
3370-
3371-
> Stability: 1 - Experimental
3372-
3373-
* `file` {string} The name or path of the executable file to run.
3374-
* `args` {string\[]} List of string arguments. No argument can contain a null-byte (`\u0000`).
3375-
* `env` {Object} Environment key-value pairs.
3376-
No key or value can contain a null-byte (`\u0000`).
3377-
**Default:** `process.env`.
3378-
3379-
Replaces the current process with a new process.
3380-
3381-
This is achieved by using the `execve` POSIX function and therefore no memory or other
3382-
resources from the current process are preserved, except for the standard input,
3383-
standard output and standard error file descriptor.
3384-
3385-
All other resources are discarded by the system when the processes are swapped, without triggering
3386-
any exit or close events and without running any cleanup handler.
3387-
3388-
This function will never return, unless an error occurred.
3389-
3390-
This function is not available on Windows or IBM i.
3391-
33923392
## `process.report`
33933393
33943394
<!-- YAML

0 commit comments

Comments
 (0)