-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
var g = require('node-gc');
g.on('scavenge', function (i) { console.log('scavenge', i); });
g.on('marksweep', function (i) { console.log('marksweep', i); });
for (var j = 0; j <= 1000; j += 1) {
var x = new Array(10000);
for (var i = 0; i < x.length; i += 1) { x[i] = i; }
for (var i = 0; i < x.length; i += 1) { delete x[i]; }
process.stdout.write('\r' + j);
}
console.log('\ndone');
Executing it on my local machine always yields
1000
done
scavenge { duration: 18, heapBefore: 5084096, heapAfter: 4965976 }
zsh: illegal hardware instruction (core dumped) node ./gc-test.js
If I copy/paste it into an interactive Node-session, it dies with the same message at the same point.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels