4

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?

MummyDing
  • 505
  • 1
  • 6
  • 17
  • First of all, these are just names, given to parts of the memory to denote a purpose. So, all execution environments have them or sort of, even if they might use different names for them. Further, you definitely have too many questions in one. Yet alone the third one is way too broad for Stackoverflow. If you want to know how Dalvik’s run-time data areas look like, consult a documentation of Dalvik’s internals, if there is one. – Holger Oct 26 '18 at 11:59
  • @Holger Thank you for your reply. I have searched for a long time about Dalvik's run-time data areas, but it seems that the concept "run-time data areas" will only be mentioned with JVM. I have read some articles about Dalvik's internals, but I didn't find anything similar to JVM's run-time data areas. – MummyDing Oct 27 '18 at 14:03

1 Answers1

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

BLuFeNiX
  • 2,496
  • 2
  • 20
  • 40