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: https://github.com/nodejs/node/pull/16566
Refs: https://github.com/nodejs/node/pull/16566#discussion_r147545405
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>
This commit is contained in:
Anthony Nandaa authored and Gibson Fahnestock committed 2017-11-14 17:06:36 +00:00
1 parent 13866b8b1b
commit 542f3b9cc0
1 file changed
+7 -1
+7 -1
View File
@@ -1240,7 +1240,13 @@ Will generate:
`heapTotal` and `heapUsed` refer to V8's memory usage.
`external` refers to the memory usage of C++ objects bound to JavaScript
objects managed by V8.
objects managed by V8. `rss`, Resident Set Size, is the amount of space
occupied in the main memory device (that is a subset of the total allocated
memory) for the process, which includes the _heap_, _code segment_ and _stack_.
The _heap_ is where objects, strings and closures are stored. Variables are
stored in the _stack_ and the actual JavaScript code resides in the
_code segment_.
## process.nextTick(callback[, ...args])
<!-- YAML