Tuesday, July 24, 2012

Android VM and application

Dalvik performs a host of other optimizations, such as utilizing shared memory to allow objects being used by more than one application. This results in less memory consumption and fewer garbage collector cycles (again saving computing time and therefore battery). To achieve this, Android starts a special Dalvik VM instance on system boot, called Zygote, which preloads data into the shared memory that will likely be used by all applications (such as the core libraries). The Zygote VM then forks a new Dalvik instance from itself for each new application that’s about to start. Each child process (which is also a separate Linux process) can then access the shared data.



No comments: