hello gyus is there any way to find out the current stack size of any program?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
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)
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
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.
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
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
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.
Google is your friend. I don't normally act as a Google front-end, but 'java stack size' gives this as the first item.