Search code examples
androiddalvik

Is a Dalvik virtual machine instance created for each application?


Is a Dalvik virtual machine instance created for each application, or all Android applications share the same Dalvik virtual machine instance?


Solution

  • From the developer docs:

    Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently.

    The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimised for minimal memory footprint.

    The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included dx tool.

    Also have a look at What is... The Dalvik Virtual Machine for detailed description about DVM.