Closed
Description
Testcase:
'use strict';
var count = 0, limit = 800000;
function call() {
var _buffer = new Buffer(16 * 1024);
count++;
if (count > limit) {
process.exit(0);
}
setImmediate(call);
}
for (var i = 0; i < 20; i++) {
call();
}
var gcs = new (require('gc-stats'))();
gcs.on('stats', function(stats) {
console.log(JSON.stringify(stats));
});
You could see that this causes a lot of gctype: 2
GC events.