From 6939b0c6242fb6a7a7ea8e7f4c8cd8e622a18edb Mon Sep 17 00:00:00 2001 From: Allon Murienik Date: Thu, 22 May 2025 17:19:14 +0300 Subject: [PATCH] doc: fix the order of `process.md` sections Fixes: https://github.com/nodejs/node/issues/58402 PR-URL: https://github.com/nodejs/node/pull/58403 Reviewed-By: Luigi Pinca Reviewed-By: Antoine du Hamel --- doc/api/process.md | 90 +++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index e5e609dce8a..40fb3b08cf5 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -976,6 +976,24 @@ $ bash -c 'exec -a customArgv0 ./node' 'customArgv0' ``` +## `process.availableMemory()` + + + +* {number} + +Gets the amount of free memory that is still available to the process +(in bytes). + +See [`uv_get_available_memory`][uv_get_available_memory] for more +information. + ## `process.channel` - -* {number} - -Gets the amount of free memory that is still available to the process -(in bytes). - -See [`uv_get_available_memory`][uv_get_available_memory] for more -information. - ## `process.cpuUsage([previousValue])` + +> Stability: 1 - Experimental + +* `file` {string} The name or path of the executable file to run. +* `args` {string\[]} List of string arguments. No argument can contain a null-byte (`\u0000`). +* `env` {Object} Environment key-value pairs. + No key or value can contain a null-byte (`\u0000`). + **Default:** `process.env`. + +Replaces the current process with a new process. + +This is achieved by using the `execve` POSIX function and therefore no memory or other +resources from the current process are preserved, except for the standard input, +standard output and standard error file descriptor. + +All other resources are discarded by the system when the processes are swapped, without triggering +any exit or close events and without running any cleanup handler. + +This function will never return, unless an error occurred. + +This function is not available on Windows or IBM i. + ## `process.exit([code])` - -> Stability: 1 - Experimental - -* `file` {string} The name or path of the executable file to run. -* `args` {string\[]} List of string arguments. No argument can contain a null-byte (`\u0000`). -* `env` {Object} Environment key-value pairs. - No key or value can contain a null-byte (`\u0000`). - **Default:** `process.env`. - -Replaces the current process with a new process. - -This is achieved by using the `execve` POSIX function and therefore no memory or other -resources from the current process are preserved, except for the standard input, -standard output and standard error file descriptor. - -All other resources are discarded by the system when the processes are swapped, without triggering -any exit or close events and without running any cleanup handler. - -This function will never return, unless an error occurred. - -This function is not available on Windows or IBM i. - ## `process.report`