Skip to content

Commit 09181eb

Browse files
profnandaacjihrig
authored andcommitted
doc: add details about rss on process.memoryUsage
1. `process.memoryUsage()` returns an object with 4 keys: `rss, heapTotal, headUsed, external`. There were brief explanations for the rest except `rss`. This commit adds this on the docs. 2. A little more clarity on `rss` to help people disambiguate it from the virtual memory size. PR-URL: #16566 Refs: #16566 (comment) Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 3fd7edd commit 09181eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/api/process.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,13 @@ Will generate:
12821282

12831283
`heapTotal` and `heapUsed` refer to V8's memory usage.
12841284
`external` refers to the memory usage of C++ objects bound to JavaScript
1285-
objects managed by V8.
1285+
objects managed by V8. `rss`, Resident Set Size, is the amount of space
1286+
occupied in the main memory device (that is a subset of the total allocated
1287+
memory) for the process, which includes the _heap_, _code segment_ and _stack_.
1288+
1289+
The _heap_ is where objects, strings and closures are stored. Variables are
1290+
stored in the _stack_ and the actual JavaScript code resides in the
1291+
_code segment_.
12861292

12871293
## process.nextTick(callback[, ...args])
12881294
<!-- YAML

0 commit comments

Comments
 (0)