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

MummyDing :

According to Oracle Docs Run-Time Data Areas states, JVM contains various parts of data areas: enter image description here 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?

BLuFeNiX :
  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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=78645&siteId=1