Skip to content

Instantly share code, notes, and snippets.

Created July 28, 2015 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/c80a6def98806266ec1a to your computer and use it in GitHub Desktop.
Save anonymous/c80a6def98806266ec1a 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