DVM和JVM之间的区别是什么? [英] What is the difference between DVM and JVM?

查看:143
本文介绍了DVM和JVM之间的区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是Java虚拟机和Dalvik虚拟机之间的区别是什么?

What is difference between Java Virtual Machine and Dalvik Virtual Machine?

推荐答案

DVM是基于寄存器的,其目的是在低内存中运行,使用它自己的字节code和运行.Dex文件

DVM is Register based which is designed to run on low memory, uses its own byte code and runs .Dex file

JVM是基于栈,它使用Java字节code和具有JIT运行的.class文件。

JVM is Stack based which uses java byte code and runs .class file having JIT.

Java源代码code编译Java编译器为.class文件。 然后DX(dexer)工具,Android SDK的一部分处理.class文件到名为DEX文件格式,其中包含的Dalvik字节code。 DX的工具,消除所有的冗余信息是present中的类。 在DEX的应用程序的所有类都打包成一个文件。 DVM的设计使设备能够高效地运行虚拟机的多个实例。

Java source code is compiled by the Java compiler into .class files. Then the dx (dexer) tool, part of the Android SDK processes the .class files into a file format called DEX that contains Dalvik bytecode. The dx tool eliminate all the redundant information that is present in the classes. In DEX all the classes of the application are packed into one file. DVM has been designed so that a device can run multiple instances of the VM efficiently.

基于堆栈的设备必须使用指令来加载堆栈中的数据和处理数据,并因此需要比寄存器机的指令来实现同样高的水平code,但在一个寄存器机器指令必须EN $ c和$ c中的源和目的寄存器,因此,往往要大一些。

stack-based machines must use instructions to load data on the stack and manipulate that data, and, thus, require more instructions than register machines to implement the same high level code, but the instructions in a register machine must encode the source and destination registers and, therefore, tend to be larger.

这篇关于DVM和JVM之间的区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆