I have some problems with the "memory leak problem" in several versions of NodeJ.
EDIT:
I tried several versions of nodeJs: v0.8.10, v0.10.22, v0.10.23, v0.10.24 ... I'm on MacOSX 10.9.1.
Here is my test.js:
function a() {
console.log( process.memoryUsage() );
global.gc();
}
var b = setInterval(a,5000);
I run it with:
node --expose-gc test.js
Here is the result:
{ rss: 12312576, heapTotal: 5115392, heapUsed: 2429656 }
{ rss: 13406208, heapTotal: 6163968, heapUsed: 2139848 }
{ rss: 13463552, heapTotal: 6163968, heapUsed: 1911320 }
{ rss: 14295040, heapTotal: 6163968, heapUsed: 1919632 }
{ rss: 14434304, heapTotal: 6163968, heapUsed: 1898944 }
... etc ...
As you can see, RSS does not stop growing, heapTotal is stable, heapUsed moves, but remains balanced.
Does anyone understand why RSS (Resident Set Size) is still growing? This is normal? Is this a node memory leak?
What happens on your machines?
EDIT:
I tried the linux server, and headTotal and RSS are stable! Looks like a problem in nodeJs for MacOs ?! Does anyone know why?
Thanks!