I have an app running OOM with plenty of free heap space free and available to grow on a stock Galaxy S3. The app runs fine on other devices.
Knowing that in traditional Java this can be caused by being OOM within the permanent generation space, I tried looking into how Dalvik handles this, but couldn't find anything definitive. Androids SDK seems to be missing both MemoryUsage and ManagementFactory, so I can't get them as you would in Java.
I'm trying to find out if Android has a permanent generation space, can I inspect its contents, how can I get the size and free, does Dalvik handle what goes into this space different than JVM, etc.
Also open to other ideas if this space doesn't exist or it's not likely.
A bit of info on the app. The S3 that is running OOM is running 4.1.2. The app uses roughly 12-25 MBs of heap with the max heap size available being around 45MBs. It has a lot of local resource images, and lazy loads many more later on. I'm .recylce()ing the bitmaps. The app crashes in roughly the same spot every time. I've gave a good look at the code around the spot that crashes and I'm not seeing anything out of the ordinary. Other devices run this code just fine.