joyent/node — Issue #2595: Memory leak in unzip()
Author: vflash
Created: 2012-01-23 06:56:38+00:00
State: open

когда съедает всю память процесс умирает. тест делал на виртуальной машине с 1гб памятью.
eats all memory when the process dies. test done on a virtual machine with 1GB of memory.

latest (0.7.0-pre) node
node --expose-gc

var buffer = new Buffer('eJzT0yMAAGTvBe8=', 'base64');
function nullfun(){};

function test() {
console.log(process.memoryUsage());

for (var i = 0; i < 100; i++) {
zlib.unzip(buffer, nullfun);
};

process.nextTick(test);
};

process.nextTick(test);

{ rss: 870871040, heapTotal: 42841856, heapUsed: 8936624 }
{ rss: 871223296, heapTotal: 42841856, heapUsed: 9354648 }
{ rss: 871858176, heapTotal: 42841856, heapUsed: 9630272 }
{ rss: 872452096, heapTotal: 42841856, heapUsed: 10048328 }
{ rss: 872853504, heapTotal: 42841856, heapUsed: 10331552 }
Убито
vflash@vu:~/work$