Skip to content

Instantly share code, notes, and snippets.

@sirodoht
Created December 27, 2016 12:39
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 sirodoht/c82914bb7ebd97da7145a8c5fea34242 to your computer and use it in GitHub Desktop.
Save sirodoht/c82914bb7ebd97da7145a8c5fea34242 to your computer and use it in GitHub Desktop.
Compute call stack limit
function computeMaxCallStackSize() {
try {
return 1 + computeMaxCallStackSize();
} catch (e) {
// Call stack overflow
return 1;
}
}
computeMaxCallStackSize();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment