3

I'm dealing with the "Low memory: no more background process" problem. My activity is at background and killed when the situation occurs.

I'm trying to save and load the instance state to solve it.

But since it doesn't happen every time. How should I test my activity with this situation?

Thanks!

shiami
  • 7,174
  • 16
  • 53
  • 68

1 Answers1

1

You can force your process to die through adb.

> adb shell
# ps
# kill -9 <pid>

where <pid> is the process id of your app. Caveat: I don't know if this method of ending the process is the same as when the OS decides it needs more resources.

Another approach might be to do it through Settings (click on your app under Application Management and then on the Force Stop button).

Ted Hopp
  • 232,168
  • 48
  • 399
  • 521
  • Yeah that is pretty much the behavior of the [OOM Killer](http://lwn.net/Articles/317814/) that ive seen. Sometimes though, ive seen it send a SIG :3 to all processes. – Reno Feb 22 '11 at 09:09