hello gyus is there any way to find out the current stack size of any program?
Printable View
hello gyus is there any way to find out the current stack size of any program?
Sounds like a job for Thread.currentThread().getStackTrace().
Thread (Java Platform SE 6)
but i think this works to find out the stack trace i.e the usage of stack.but i have to find out the remaing stack size of code.
My code is a single thread program. if i allocate the stack size of 1024K so how would i find when main thread executes how much stack has been consumed and how much is still available? and if i do not allocate the stack size so how much stack size will allocated by JVM by default?
Thread moved to Java Theory & Questions
Google is your friend. I don't normally act as a Google front-end, but 'java stack size' gives this as the first item.