Java static allocation - heap, stack, and everlasting generation

terry73

New member
I've started studying a great deal about memory allocation strategies in Java lately, and I've had a lot of worries as I've read from various sources. I've gathered my ideas, and I'd want to request that you go through all of the points and remark on them. I discovered that memory allocation is JVM-specific, thus I must state upfront that my query is Sun-specific.
Classes (as loaded by classloaders) are stored on the heap in a particular area: Generation Eternal
All information connected to a class, such as the class name, Object arrays associated with the class, internal JVM objects (such as java/lang/Object), and optimization information, is stored in the Permanent Generation area.
All static member variables are stored on the Permanent Generation is back.
Objects are assigned to a separate heap: The next generation
Each method, whether static or non-static, has just one copy per class. That copy is saved in the Permanent Generation section. For non-static methods, all parameters and local variables are pushed into the stack, and anytime that method is used, a new stack-frame is created. I'm not clear where the static method's local variables are kept. Are they among the Permanent Generation? Or perhaps only their reference is kept in the Permanent Generation region, while the real copy is kept someplace else (Where?).
I'm also not sure where a method's return type is stored.
If the objects (in the young generation) needs to use a static member (in the permanent generation), they are given a reference to the static member && they are given enough memory space to store the return type of the method,etc.
Thank you for going through this !