On Nov 25, 7:05 pm, Dianne Hackborn <
hack...@android.com> wrote:
> This callback is when memory is becoming critical. You should free up as
> much as you can.
And there is no earlier warning, right?
> Btw 250MB is way too large for just "cache" memory. Look at
> ActivityManager.getMemoryClass() to get a hint of how large you should keep
> your heap (this is the limit *imposed* on the Java heap, but native apps
> don't have this limit though more and more it is looking like stronger
> control over them is needed); you will see you are getting into an order of
> magnitude out from it.
So you're suggesting that on a device with half a gigabyte of RAM, I'm
only supposed to use 30 megabytes?! Buy shares in RAM manufacturers!
Come on. What is all that half gigabyte being used for? If I limit
my cache to 30 MBytes, the user constantly sees stuff being swapped in
and out. If I let it use 200 MBytes the device functions fine. How
do I find the real limit? Shall I just get the available physical RAM
and use half of it, or something?
Thanks, Phil.