Do apps using multiple processes share a Dalvik instance?

岁酱吖の 提交于 2019-12-05 00:00:46

问题


I'm studying Android process management and I'm wondering whether apps using multiple processes (not threads) share a Dalvik instance or there exists a Dalvik instance per process, even for the same app.

Could you point me to some official source (doc, talk, paper etc.)?

Thanks


回答1:


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.



来源:https://stackoverflow.com/questions/4936531/do-apps-using-multiple-processes-share-a-dalvik-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!