diff --git a/doc/api/process.md b/doc/api/process.md index 80fa2f826de93a..65dcf7477189db 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1103,6 +1103,25 @@ and [Cluster][] documentation), the `process.connected` property will return Once `process.connected` is `false`, it is no longer possible to send messages over the IPC channel using `process.send()`. +## `process.constrainedMemory()` + + + +* {number} + +Gets the amount of memory available to the process (in bytes) based on +limits imposed by the OS. If there is no such constraint, or the constraint +is unknown, `0` is returned. + +It is not unusual for this value to be less than or greater than `os.totalmem()`. +This function currently only returns a non-zero value on Linux, based on cgroups +if it is present, and on z/OS based on `RLIMIT_MEMLIMIT`. + +See [`uv_get_constrained_memory`][uv_get_constrained_memory] for more +information. + ## `process.cpuUsage([previousValue])`