|
How to set a stack size. -Xss doesn't work
Hi,
Simple program:
public class Stack {
static int a;
static void f(){
a++;
f();
}
public static void main(String[] args){
a=0;
try{f();}
catch(StackOverflowError e)
{System.err.print(e.getClass() + " a= " + a);}
}
}
always throws StackOverflow error for the same value of a.
regardless I run the program as java -Xss1k Stack or java -Xss1024K Stack
My understanding is the larger stack the longer the program should run.
What I am missing?
Thank you for your help
Last edited by protonus : 06-27-2008 at 01:12 AM.
|