JVM and Dalvik differences
1, Dalvik is based on registers, the register is a memory space inside the CPU, access speed, and the JVM is based on the stack, the stack is a contiguous memory of storage space, access speed than register slower. Register-based virtual machines for larger programs, it takes less time to compile.
2, Dalvik is mainly the completion of object lifecycle management, stack management, thread management, security and exception management, as well as garbage collection and other important functions.
3, Dalvik responsible for process isolation and thread management, each Android application in the bottom will be corresponding to a separate Dalvik virtual machine instance, its code in the virtual machine interpretation to execute.
4. Unlike Java virtual machines running Java bytecode (. java. Class), the Dalvik virtual machine runs its proprietary file format, DEX (Dalvik executable) The Dex file format reduces the overall file size and improves the class lookup speed of I/O operations (. java. class-. Dex).
5, all the android application threads are corresponding to a Linux thread, the virtual machine can therefore rely more on the operating system thread scheduling and management mechanism
6. Dalvik is typically written in C or C + +, and the JVM is typically written in C + + or Java
7, if the JVM accidentally died, then all the Java programs running above are dead, and Dalvik dead, only one corresponding application died, the other did not affect.
JVM and Dalvik differences