问题
It is evident from Java Virtual Machine Implementation (http://docs.oracle.com/javase/specs/jvms/se7/html/index.html) that stack frame present on heap which stores the method's runtime data. But what are the contents of stack frame in java and how the stack frame is organized to store values of local variables and intermediate results. How is the data structure organized.
回答1:
First of all, stack frame is part of JVM stack, not Heap [JVM memory is divided in 5 parts: Method Area, Heap, Stack, PC Register and Native Memory.]
To answer your question, stack frame is divided into three parts: local variable array, frame data and operand stack. Refer to the following link for detailed info: http://www.artima.com/insidejvm/ed2/jvm8.html
来源:https://stackoverflow.com/questions/20441256/contents-of-stack-frame-in-java