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 <[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]>
  • Loading branch information
profnandaa authored and gibfahn committed Nov 14, 2017
1 parent 13866b8 commit 542f3b9
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 @@ -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
Expand Down

0 comments on commit 542f3b9

Please sign in to comment.