public
Created

Zlib leak node v0.8.12

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
var zlib = require('zlib');
var completed = 0;
 
 
function printProcMem() {
if (completed % 100 == 0) {
var mem = process.memoryUsage();
console.log('%d %d %d %d',
completed, mem.rss / 1000000, mem.heapTotal / 1000000, mem.heapUsed / 1000000);
}
zlib.deflate('toto', function(err, buffer) {
if (err) {
console.warn(err);
}
completed += 1;
setTimeout(printProcMem, 10);
})
}
 
console.log('# Run # RSS # Heap Total # Heap Used');
printProcMem();
setTimeout(process.exit, 300000);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.