了解Android的:受精卵和DalvikVM [英] Understanding Android: Zygote and DalvikVM

查看:198
本文介绍了了解Android的:受精卵和DalvikVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解Android的劳克应用。现在的问题是如何准确地受精卵派生Dalvik虚拟机。我真的不明白为什么它是不可能在同一个Dalvik虚拟机运行多个应用程序。

解决方案
  

没有。 Dalvik的不跨越的进程。

     

然而,活页夹IPC机制可以做到使物体的一个很有说服力的工作似乎迁移到一个不同的过程和Dalvik的实例。此外,内存管理是非常好的关于共享只读跨越需要它们的所有进程的页面。在Dalvik过程托管一个典型的应用程序是分叉断合子与所有已映射常见的Andr​​oid库,因此新的独特的副本没有被打开。

来源:<一href="http://stackoverflow.com/questions/4936531/do-apps-using-multiple-processes-share-a-dalvik-instance">Do使用多进程应用程序共享的Dalvik实例?

另外,请查阅以下链接:

<一个href="http://davidehringer.com/software/android/The_Dalvik_Virtual_Machine.pdf">http://davidehringer.com/software/android/The_Dalvik_Virtual_Machine.pdf

<一个href="http://commonsware.com/blog/Articles/what-is-dalvik.html">http://commonsware.com/blog/Articles/what-is-dalvik.html

I try to understand how Android lauch applications. The question is how does zygote exactly fork Dalvik VM. I dont really understand why it is not possible to run multiple applications in the same Dalvik VM.

解决方案

No. Dalvik doesn't span processes.

However, the Binder IPC mechanism can do a very convincing job of making objects appear to migrate to a different process and its Dalvik instance. Also, the memory management is very good about sharing read-only pages across all processes that need them. The Dalvik process hosting a typical app is forked off of zygote with all the common android libraries already mapped, so new unique copies don't have to be opened.

Source: Do apps using multiple processes share a Dalvik instance?

Also check these links:

http://davidehringer.com/software/android/The_Dalvik_Virtual_Machine.pdf

http://commonsware.com/blog/Articles/what-is-dalvik.html

这篇关于了解Android的:受精卵和DalvikVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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