On Tue, Mar 16, 2010 at 8:11 AM, hans <hans.dulima...@gmail.com> wrote:

> However, the next paragraph of the above document indicates that
> components of an app can be setup to run on more than one processes.
> So, theoretically it is possible to arrange an app with M+N components
> to run on two processes P and Q where P runs M components and Q runs
> the remaining N components. If P is killed, then the M components will
> get wiped out, but the other N components still run on the second
> process Q... nevertheless a process is needed to run these remaining N
> components.
>

This is true, however I would caution against using this as a way to avoid
components being killed.  In fact you are likely to shoot yourself in the
foot: because each process is relatively heavy-weight (they each of their
own instance of the dalvik VM running), you will end up using more RAM
overall and thus have a greater chance of one of your processes being
killed.

The custom process facility is actually used by the platform mostly for the
opposite purpose: to allow multiple .apks to run in the same shared process,
to reduce the overall RAM footprint.  For example, this is what the "acore"
process is (multiple platform .apks sharing one process), "gapps" (multiple
Google .apks sharing one process), as well as many other places.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to