The Dalvik virtual machine is a major part of Google's Android platform for mobile devices. Virtual machines can run Java platform applications that are converted into a compact Dalvik executable format (. dex), which is suitable for systems with memory and processor speed limitations.
The author of the Dalvik virtual machine is Dambernstein (Dan Bornstein).
Unlike most virtual machines and real Java virtual machines, the former is a stack machine, and the Dalvik VM is a register-based architecture. Like the argument between CISC and RISC, the relative merits of these two approaches are a topic of constant debate, and sometimes the technical boundaries become blurred. In addition, the relative advantages of the two methods depend on the interpretation/compilation strategy chosen. However, in general, stack-based machines must use instructions to load data on the stack or manipulate the data using instructions, so more instructions are required than register-based machines. However, the instructions in the Register must encode the source and destination registers, so often the instructions are larger.
A tool called DX, which converts a Java. class file into the. dex format. Multiple class files can be included in a single. dex file. Duplicate strings that can be used for multiple classes and other constants are output to reserved space when converted to. dex format. Java bytecode can also be converted to an optional, Delvik VM-used instruction set. An uncompressed. dex file is often smaller in file size than a. jar file that is compressed from the same. class file.
When the Dalvik executable is installed on a mobile device, they can be modified. For further optimizations, the byte order in some data, simple data structures, and inline libraries can be interchanged, such as empty objects being shorted.
To optimize for low memory requirements, Dalvik virtual machines have unique features that are distinct from other standard virtual machines:
(1) Virtual machine is small, the use of space is small;
(2) Dalvik no JIT compiler;
(3) The constant pool has been modified to use only 32-bit indexes to simplify the interpreter;
(4) It uses its own byte code, not Java bytecode.
In addition, Dalvik is designed to meet the many virtual machine instances that can be run efficiently.
Dalvik the location of the virtual machine in the Android architecture
Android Virtual Machine Davlik