Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 770 Bytes

process_memoryusage.md

File metadata and controls

39 lines (31 loc) · 770 Bytes
  • Returns: {Object}
    • rss {integer}
    • heapTotal {integer}
    • heapUsed {integer}
    • external {integer}

The process.memoryUsage() method returns an object describing the memory usage of the Node.js process measured in bytes.

For example, the code:

console.log(process.memoryUsage());

Will generate:

{
  rss: 4935680,
  heapTotal: 1826816,
  heapUsed: 650472,
  external: 49879
}

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.