Jeff Verdegan wrote:All local variables, including method parameters, go on the stack. Everything else--class definitions, object instances, static and non-static member variables, constant pools--is in the heap. To answer "What is Eden space?" Google is your friend.
vaibhav vishal wrote:
Jeff Verdegan wrote:All local variables, including method parameters, go on the stack. Everything else--class definitions, object instances, static and non-static member variables, constant pools--is in the heap. To answer "What is Eden space?" Google is your friend.
what if "Everything else--class definitions, object instances, static and non-static member variables, constant pools" is also local to some method??
Jesper de Jong wrote:The advantage to putting an object on the heap instead of the stack is that deallocating the memory for the object is essentially free: it's automatically discarded at the moment the method returns,
Escape analysis was introduced in one of the Oracle Java 6 updates (I think update 14).
vaibhav vishal wrote:In respect of above what are new and old generations, what is Eden space?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Jeff Verdegan wrote:
Escape analysis was introduced in one of the Oracle Java 6 updates (I think update 14).
Really???I thought it was considered for Java 7 but shelved.
Joanne
Winston Gutkowski wrote:
vaibhav vishal wrote:In respect of above what are new and old generations, what is Eden space?
Do you have any particular reason for needing to know this information? As Jesper said, this is advanced stuff, and unless you're planning on writing a "new improved" Java garbage collector, the chances are you'll never need it. I've managed to get through 10 years without needing to know it in detail, and it certainly won't make you a better Java programmer...indeed, it may well distract you.
Winston
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|