Does Dalvik create stacks to manage threads

49 Views Asked by At

Unlike JVMs, which are simple stack-based machines, the Dalvik VM uses a register-based — which requires fewer instructions, avoids unnecessary memory access — resulting in better performance code.

But how does Dalvik manage thread stacks? Does it create a stack for a thread?

1

There are 1 best solutions below

0
JesusFreke On

Yes. The "registers" are just locations on the call stack. When you call into a method, it allocates however much space is needed on the stack to hold the "registers" for the method being called.