The basis of the Android platform-Dalvik virtual machine.
Dalvik is designed as a device to efficiently run multiple virtual systems at the same time.
Dalvik executable file for Dalvik virtual machine execution (. Dex), This format file is for inner Memory usage is optimized. At the same timeDalvik Virtual machines are register-based All classes are compiled by the Java compiler, and
The "dx" tool of is converted to. Dex format from Dalvik Virtual Machine execution.
The Dalvik virtual machine depends on some features of the Linux kernel, such as the thread mechanism and the underlying memory management mechanism.
Primary differences between Dalvik and standard Java Virtual Machine (JVM)
Dalvik is based on registers, while JVM is based on stacks ., Register-based virtual machines for largerProgramFor example, during their compilation
.
Differences between Dalvik and Java runtime Environments
(1) The Dalvik is optimized to allow instances of multiple virtual machines to run simultaneously in limited memory, and each Dalvik application acts as an independent
Linux Process execution. Independent processes can prevent all programs from being shut down when the Virtual Machine crashes.
(2)Java Runtime Environment (Java Runtime Environment) Includes the following two parts:
Java Virtual Machine: To achieve the principle that a compilation can run everywhere, Java does not generate the target machine language after the compilation connection, but uses the Java bytecode shared instruction, in this case, a virtual machine is required to execute the change command.
Library: provides some common libraries like the common C language.
The Virtual Machine Used by Android is called Dalvik. It was originally not designed for Java and cannot run the Java bytecode command. Instead, it runs Dalvik executable, DX for short. Therefore, the android SDK provides the DX tool to convert Java bytecode to DX.