Skip to content

Instantly share code, notes, and snippets.

@svennam92
Forked from anonymous/app.js
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svennam92/a29fab2fe1041c192f88 to your computer and use it in GitHub Desktop.
Save svennam92/a29fab2fe1041c192f88 to your computer and use it in GitHub Desktop.
Create OOM when hitting endpoint
app.get('/OOM', function(req, res){
(function () {
function tree (n, m) {
if (n > 0) {
var a = new Array(m);
for (var i = 0; i < m; i++) a[i] = tree(n - 1, m);
return a;
}
}
var trees = [];
while (true) trees.push(tree(15, 2));
})();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment