Skip to content

Commit

Permalink
doc: add details about rss on process.memoryUsage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
profnandaa authored and MylesBorins committed Nov 14, 2017
1 parent 8264328 commit 290df5a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,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
Expand Down

0 comments on commit 290df5a

Please sign in to comment.