Skip to content

Instantly share code, notes, and snippets.

@kishaningithub
Last active August 29, 2015 14:06
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 kishaningithub/7273be2ec5deae0c4f47 to your computer and use it in GitHub Desktop.
Save kishaningithub/7273be2ec5deae0c4f47 to your computer and use it in GitHub Desktop.
Java System Stack Limit Test
/* max sys stack entries
My i7 mac - 11909
My office i5 dell pc - 8437
*/
public class StackOverFlowThreshold
{
private static int noOfCalls=0;
public static void main(String[] args)
{
try{
func();
}catch(StackOverflowError e){
System.out.println(noOfCalls);
}
}
private static void func()
{
noOfCalls++;
func();
}
}
@rsrini7
Copy link

rsrini7 commented Sep 22, 2014

My Office PC : 13237

@rsrini7
Copy link

rsrini7 commented Sep 22, 2014

2nd time: 14412
3rd time : 12931
4th time: 13339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment