简体   繁体   English

Android Runtime(ART或Dalvik)是否包含Java VM堆栈或JVM等本机方法堆栈?

[英]Does Android Runtime(ART or Dalvik) contain Java VM stack or Native Method Stack like JVM?

According to Oracle Docs Run-Time Data Areas states, JVM contains various parts of data areas: 根据Oracle Docs Run-Time Data Areas的说法,JVM包含数据区域的各个部分: 在此输入图像描述 And I also learnt that JVM is stack-based and ART/Dalvik is register-based. 我还了解到JVM是基于堆栈的,而ART / Dalvik是基于寄存器的。 Dalvik heap is made of Active Heap and Zygote Heap. Dalvik堆由Active Heap和Zygote堆组成。
Questions are as following: 问题如下:
1. What is the difference between "Stack" in stack-based and "Stack" in Java VM stack/Native Method Stack. 1.基于堆栈的“堆栈”与Java VM堆栈/本机方法堆栈中的“堆栈”之间有什么区别。
2. Does ART/Dalvik contain stacks like Java VM stacks in JVM? 2. ART / Dalvik是否包含JVM中的Java VM堆栈等堆栈?
3. What do ART/Dalvik Run-Time Data Areas look like? 3. ART / Dalvik运行时数据区是什么样的?

  1. What is the difference between "Stack" in stack-based and "Stack" in Java VM stack/Native Method Stack. 在基于堆栈的“堆栈”和Java VM堆栈/本机方法堆栈中的“堆栈”之间有什么区别。

They refer to the same thing. 他们指的是同一件事。 A "stack based" VM uses the stack of its memory space in order to carry out logical and arithmetic operations. “基于堆栈”的VM使用其存储空间的stack来执行逻辑和算术运算。

Does ART/Dalvik contain stacks like Java VM stacks in JVM? ART / Dalvik是否包含JVM中的Java VM堆栈等堆栈?

The Android VM implementation (both Dalvik and ART) are not Stack based , but instead Register based . Android VM实现(Dalvik和ART)不是Stack based ,而是Register based One thing this allows Android to do is directly map virtual registers to real hardware registers, which improves execution speed and efficiency. 允许Android做的一件事是将虚拟寄存器直接映射到真实硬件寄存器,从而提高执行速度和效率。

  1. What do ART/Dalvik Run-Time Data Areas look like? ART / Dalvik运行时数据区是什么样的?

You can see an example of this, and read more about stack-based vs register-based VMs here . 您可以看到这样的示例,并在此处阅读有关基于堆栈和基于寄存器的VM的更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM