Hi , we observed one scenario where activity manager killed our
application processs(it includes 5 running services) and then re-
started only 1 service(this service was first one to be destroyed) .
What could be the reason for this behavior ?
Does AM checks for available resources before starting any proc ?
Please suggest . Other 4 services were never started by AM .
On Aug 12, 4:43 am, Dianne Hackborn <
hack...@android.com> wrote:
> Yes this is the desired behavior. If the device had less memory available,
> it would have been killing those processes anyway. This change is just for
> devices with fairly extreme amounts of memory (such as the nexus one), to
> avoid keeping around more processes than it makes any sense to.
>
> Note that this does take into account running services -- the max count is
> for actual background processes. There could be some confusion though
> because after a service has been running continuously for a while we
> sneakily drop it down into the background OOM class from the service OOM
> class, to ensure that it will be eventually be killed and restarted. This
> is to avoid issues with services with memory leaks or other long-running
> problems.
>
> That said, the actual number we picked is fairly arbitrary. :)
>
>
>
> On Tue, Aug 10, 2010 at 9:37 PM, davidkrause <
david.kra...@gmail.com> wrote:
> > We noticed that in Froyo, some functionality was added in Activity
> > Manager (AM) to proactively kill "hidden" applications. AM gives
> > priority to background applications that have activities or content
> > providers. It does not take into account any services currently
> > running in the application.
>
> > A year or so ago, there was a discussion about OOM killer killing
> > process that had running services, and it was noted that those
> > processes were scheduled to restart right away, see
>
> >
http://groups.google.com/group/android-platform/browse_thread/thread/...
>
> > When the MAX_HIDDEN_APPS is set to the default value (15), we can see
> > that many applications that have services running in them are killed
> > and them immediately scheduled to be re-started. Is this the desired
> > behavior, since we know that AM will turn right around and restart
> > these applications? Since this is proactive killing by AM, would it
> > be better if AM took into account running services when it decided who
> > to kill?
>
> > Or are we missing something, and these apps with running services
> > should be created differently, maybe as persistent, to prevent this
> > from happening?
>
> > Also, where did the choice of 15 for MAX_HIDDEN_APPS come from?
>
> > Thanks,
> > -- Dave
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to
android-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
android-platfo...@googlegroups.com<
android-platform%2Bunsu...@googlegroups.com>
> > .
>
hack...@android.com