About Dalvik VM

Source: Internet
Author: User

About Dalvik VM

 

The Dalvik virtual machine is a major part of Google's Android platform for mobile devices. Virtual machines can run Java platform applicationsProgramThese applications are converted to a compact Dalvik executable format (. Dex) that is suitable for systems with limited memory and processor speed.

The Dalvik virtual machine was created by Dan bornstein ).

Unlike most virtual machines and real Java virtual machines, the former is a stack machine, while the Dalvik VM is a register-based architecture. Just like the debate between CISC and RISC, the relative advantages of these two methods are a topic of constant debate, and sometimes technical boundaries become blurred. In addition, the relative advantages of the two methods depend on the selected interpretation/compilation policy. However, in general, the stack-based machine must use commands to load data on the stack, or use commands to manipulate data. Therefore, more commands are required than the register-based machine. However, the instructions in the register must encode the Source and Destination registers, so the commands are usually larger.

A tool named dx is used to convert the. Class file of Java to The. Dex format. Multiple class files can be contained in a single. Dex file. Repeated strings and other constants that can be used for multiple classes are output to the reserved space when they are converted to the. Dex format. Java bytecode can also be converted to an optional instruction set used by delvik VM. An uncompressed. Dex file is usually smaller in size than a. jar file compressed from the same. Class file.

When Dalvik executable files are installed on mobile devices, they can be modified. For further optimization, the byte sequence in some data, simple data structures, and inline function libraries can be interchangeable. For example, empty objects are short-circuited.

The Dalvik virtual machine is constantly optimized to meet low memory requirements. It has some unique features different from other standard virtual machines:

(1) the virtual machine is small and the space used is small;
(2) Dalvik does not have the JIT compiler;
(3) The constant pool has been changed to a 32-bit index only to simplify the interpreter;
(4) it uses its own bytecode instead of Java bytecode.

 

In addition, Dalvik is designed to efficiently run multiple VM instances.

 

Location of Dalvik Virtual Machine in Android Architecture

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.