Android Virtual Machine Dalvik

Source: Internet
Author: User

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.

Related Article

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.