S
S
Super User2015-08-30 18:32:36
Node.js
Super User, 2015-08-30 18:32:36

What does heapUsed mean in the JSON that process.memoryUsage returns?

I display data from process.memoryUsage() on the page. When the page is refreshed, the value of heapUsed constantly increases, but heapTotal does not change. Hope it's not a memory leak? Please explain what is happening.

{"rss":25714688,"heapTotal":17029888,"heapUsed":7222192}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-08-30
@sergeystepanov1988

Heap
vsize (Virtual Memory Size) - The total amount of memory available to the process (including shared memory, swap, etc.)
rss (Resident Set Size) - how much memory from RAM is available to the process.
heapTotal - how much memory is allocated for the heap
heapUsed - how much memory has already been allocated on the heap
According to your data, it is impossible to judge a memory leak, since not enough memory has been used (heapUsed is much less than heapTotal), perhaps the garbage collector has not yet started.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question