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`