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 2017-10-28 01:06:52 +03:00 committed by Vse Mozhet Byt
parent 41611f9adb
commit 367db920e3

View File

@ -1282,7 +1282,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