Process

process.memoryUsage.rss()

Reads the resident set size in bytes without collecting all memoryUsage fields. This is a process-wide observation, including workers, and not a count of retained JS objects. Tested on Node.js 22.16.0. Example output (one line per entry): ["true"].

Formal Syntax & Structure

nodejs syntaxnodejs
process.memoryUsage.rss()

Return Value

number

Resident set bytes.

Working Example

Example Snippetnodejs
console.log(process.memoryUsage.rss() > 0);
Node.js Reference