-
-
Save svennam92/a29fab2fe1041c192f88 to your computer and use it in GitHub Desktop.
Create OOM when hitting endpoint
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
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