Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: add rss leak note on process memoryUsage
  • Loading branch information
fengmk2 authored Jul 11, 2025
commit bc4086867258f2956cbe0343a0f572fbbc7edf07
5 changes: 5 additions & 0 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2807,6 +2807,11 @@ The `process.memoryUsage()` method iterates over each page to gather
information about memory usage which might be slow depending on the
program memory allocations.

### A note on process memoryUsage

Once you notice that the `rss` continues to rise while the `heapTotal` shows normal, and the `rss` is more than three times higher than the `heapTotal`, it is very likely that there is an issue with an external memory leak.
Referer to the discussions in [nodejs/node#21973](https://github.com/nodejs/node/issues/21973) and [nodejs/help#1942](https://github.com/nodejs/help/issues/1942) for suggestions on switching the system's default `malloc` to `jemalloc` to try to resolve such issues.

## `process.memoryUsage.rss()`

<!-- YAML
Expand Down
Loading