问题
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