Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Zlib leak node v0.8.12

View gist:3922818
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.