M
process.memoryUsage.rss
History
Added in: v15.6.0, v14.18.0
v15.6.0, v14.18.0
Introduced in: v0.10.0
v0.10.0
process.memoryUsage.rss(): integer
Returns:
integerThe process.memoryUsage.rss() method returns an integer representing the
Resident Set Size (RSS) in bytes.
The 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, including all C++ and JavaScript objects and code.
This is the same value as the rss property provided by process.memoryUsage()
but process.memoryUsage.rss() is faster.
import { memoryUsage } from 'node:process'; console.log(memoryUsage.rss()); // 35655680
const { memoryUsage } = require('node:process'); console.log(memoryUsage.rss()); // 35655680