What is the maximum size of heap and stack that can be allocated for thread?

Showing Answers 1 - 1 of 1 Answers

k.o

  • Aug 12th, 2006
 

Tha allocattion of memory is done at runtime, by the JVM. memory on the heap is allocated to each object , and onthe stack to the local variables. so while a thread runs, it only uses as much space as the objects it creates.... the limit depends o n how much memory JVM has. I dont think space is allocated to the thread as a whole. only to objects and primitives.If the JVM runs opt of heap space it throws a java out of memory error.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions