What Is In Your Process
When Android needs a process for your app — such as to show the launcher activity — Android forks a copy of a process known as the zygote. As a result of the way your process is forked from the zygote, your process contains:
- A copy of a virtual machine for running your app, shared among all such processes via Linux copy-on-write memory sharing
- A copy of the Android framework classes, like
ActivityandButton, also shared via copy-on-write memory - A copy of shared native libraries, such as for SSL encryption and local database access, also shared via copy-on-write memory
- A copy of your own classes, loaded out of your APK
- A copy of classes from libraries in your app, loaded out of your APK
- Any native libraries (e.g., written in C/C++) that you linked into your app, loaded out of your APK
- Any objects created by you or the framework classes, such as the instance of your
Activitysubclass
So, our process has a lot of things in it. Much of it is shared among all other Android SDK apps forked from the zygote. The unique elements will be those things that we use from our APK.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.