One, Dalvik virtual machine
is actually a Java virtual machine, but it does not execute the class file, but the Dex file
both the Dalvik virtual machine and the art virtual machine implement three interfaces for abstracting Java virtual machines:
1. Jni_getdefaultjavavminitargs-- Get the default initialization parameters for the virtual machine
2. JNI_CREATEJAVAVM-- Create a virtual machine instance in the process
3. Jni_getcreatedjavavms-- Gets the virtual machine instance created in the process
in theAndroidSystem,Davikthe virtual machine implementationlibdvm.soin whichARTthe virtual machine implementationlibart.sothe. In other words,libdvm.soand thelibart.soexported theJni_getdefaultjavavminitargs,JNI_CREATEJAVAVMand theJni_getcreatedjavavmsthese three interfaces are for external invocation.
Second, See how ART virtual machines are seamlessly replacing Dalvik virtual machines from two perspectives?
1. The boot process of the ART virtual machine;
2. the process of Dex bytecode translation into local machine code.
Android Dalvik Virtual machine