Java中Stack框架的内容 [英] Contents of Stack Frame in Java

查看:122
本文介绍了Java中Stack框架的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Java虚拟机实现中可以看出( http:/ /docs.oracle.com/javase/specs/jvms/se7/html/index.html )存在于堆上的堆栈帧,用于存储方法的运行时数据。但是java中堆栈帧的内容是什么以及如何组织堆栈帧来存储局部变量和中间结果的值。数据结构是如何组织的。

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.

推荐答案

首先,堆栈帧是JVM堆栈的一部分,而不是Heap [JVM内存是分为5个部分:方法区,堆,堆栈,PC寄存器和本机内存。]

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.]

为了回答你的问题,堆栈框架分为三个部分:局部变量数组,帧数据和操作数堆栈。有关详细信息,请参阅以下链接:
http://www.artima .com / insidejvm / ed2 / jvm8.html

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

这篇关于Java中Stack框架的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆