简体   繁体   中英

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: 在此输入图像描述 And I also learnt that JVM is stack-based and ART/Dalvik is register-based. Dalvik heap is made of Active Heap and Zygote Heap.
Questions are as following:
1. What is the difference between "Stack" in stack-based and "Stack" in Java VM stack/Native Method Stack.
2. Does ART/Dalvik contain stacks like Java VM stacks in JVM?
3. What do ART/Dalvik Run-Time Data Areas look like?

  1. What is the difference between "Stack" in stack-based and "Stack" in Java VM stack/Native Method Stack.

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.

Does ART/Dalvik contain stacks like Java VM stacks in JVM?

The Android VM implementation (both Dalvik and ART) are not Stack based , but instead Register based . One thing this allows Android to do is directly map virtual registers to real hardware registers, which improves execution speed and efficiency.

  1. What do ART/Dalvik Run-Time Data Areas look like?

You can see an example of this, and read more about stack-based vs register-based VMs here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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