DalvikVM Vs JavaVM in Android?

前端 未结 2 1219
-上瘾入骨i
-上瘾入骨i 2021-01-14 09:07

In General, Android runs the each App as a seperate process in Dalvik Vm. I got this from the Doc. But i can not understand what is the main reason to go to Dalvik VM for An

相关标签:
2条回答
  • 2021-01-14 09:26

    Dalvik VM is used in system specially in embedded systems where memory is low and processing speed of processor is not high. Dalvik uses dex files to execute which is converted and zipped version of class files.It is very very small in size roughly less or equal of compressed jar file of same class files.

    0 讨论(0)
  • 2021-01-14 09:38

    A few differences that i found...

                        Dalvik          Vs          JVM
    
    Architecture        Register                    Stack
    OS Support          Android                     Multiple
    Re- Tools           few                         many
    Executables         APK                         JAR
    Constant-Pool       Per Application             Per class
    

    In Addition to this

    Dalvik has the capacity to compress resources that you have in your application there by reducing the final apk size and makes the device run multiple instances of the VM efficiently

    The VM was slimmed down to use less space

    Optimized for minimal memory footprint.

    From Android 2.2 SDK Dalvik has got a Just in Time compiler

    Regarding Licenses

    Dalvik is said to be a clean-room implementation rather than a development on top of a standard Java runtime, which would mean it does not inherit copyright-based license restrictions from either the standard-edition or open-source-edition Java runtimes. Dalvik is published under the Apache 2 license. (Source: wikipedia)

    You can also read more information regarding the same on the following links

    http://code.google.com/events/io/2010/sessions/jit-compiler-androids-dalvik-vm.html

    http://en.wikipedia.org/wiki/Dalvik_%28software%29

    http://2009.confidence.org.pl/materialy/prezentacje/marc_schoenefeld_reconstructing_confidence_2009.pdf

    0 讨论(0)
提交回复
热议问题