-
-
Save bnoordhuis/15bee6a68eaca4f70b10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vm = require('vm'); | |
function run() { | |
var obj = {}, ctx = vm.createContext(); | |
obj.ctx = ctx; | |
ctx.obj = obj; | |
vm.Script.runInContext('', ctx); | |
} | |
for (var i = 0; i < 1e5; i++) { | |
run(); | |
if (i % 1000 == 0) console.log(process.memoryUsage()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment