Android self-study notes-1-Brief Introduction to Dalvik and art during android Runtime

Source: Internet
Author: User

Android applications require runtime environment support and then run on devices. In android versions earlier than android, the runtime environment used by android is dalvik. In android, the brand new Runtime Environment art was tested. The following describes the two virtual machines.

Dalvik

Dalvik is a Java virtual machine designed by Google for the Android platform. It supports conversion. dex (Dalvik Executable) format Java application running ,. dex format is a compression format designed for Dalvik, suitable for systems with limited memory and processor speed. Android applications run in a single Dalvik Virtual Machine. Dalvik is dedicated to optimizing the simultaneous efficient running of multiple virtual machines. Therefore, the android system can easily isolate applications.

Anyone familiar with java Development knows that java files will be compiled into class files, and dalvik will first compile the java files into class files, but since dalvik does not comply with jvm specifications, it is optimized for the android system. The dalvikwill be followed by the class file compiled into a. dexfile, then packaged into A. APK file, as the android running application.

The Dalvik virtual machine is applicable to the characteristics of mobile terminals:
1. Proprietary. dex files integrate all. class files into one file, which reduces redundancy information in. class files and improves running performance.
2. Register-based implementation, while most VMS on PCs such as jvm are stack-based.

ART

When running an apk on the Dalvik virtual machine, you must first translate the apk into bytecode recognized by the machine each time you run it. As a result, the android system runs slowly. However, ART translates the file into bytecode at one time during installation and does not need to be translated later, which improves the program running efficiency. I think this is the biggest difference, the following link describes the details at http://www.evolife.cn/html/2013/73985.html.


Because I am not an android developer, I cannot write errors.

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.