Skip to content

Commit 290df5a

Browse files
profnandaaMylesBorins
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 <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 8264328 commit 290df5a

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
@@ -1196,7 +1196,13 @@ Will generate:
11961196

11971197
`heapTotal` and `heapUsed` refer to V8's memory usage.
11981198
`external` refers to the memory usage of C++ objects bound to JavaScript
1199-
objects managed by V8.
1199+
objects managed by V8. `rss`, Resident Set Size, is the amount of space
1200+
occupied in the main memory device (that is a subset of the total allocated
1201+
memory) for the process, which includes the _heap_, _code segment_ and _stack_.
1202+
1203+
The _heap_ is where objects, strings and closures are stored. Variables are
1204+
stored in the _stack_ and the actual JavaScript code resides in the
1205+
_code segment_.
12001206

12011207
## process.nextTick(callback[, ...args])
12021208
<!-- YAML

0 commit comments

Comments
 (0)