Question

My apologies, this is probably a dumb question. I am getting an out of memory error on my android, so I watched several hours of tutorials on DDMS. I'm still pretty new with it, but this behavior is odd.

I was getting around 30mb in my shallow heap. So, I started checking all of the objects, nothing looked too suspicius (just some big bitmaps and such), however, there are some really huge objects that don't seem to belong to my app. So, I tested ddms on an empty application. When I create a dump on a basically empty application, it still says there is 12 mb of stuff. On all the tutorials, nobody had anything similar to these. I assumed since we have to click the app to make the dump, it was gathering objects specific to the applications. Is that assumption wrong? And is there any way to fix it? Is it picking up other objects unrelated to my app?

As I said this app is essentially as bare as possible, no image resources, nothing. I just made a android application and fired it up.

Here's the histogram enter image description here

Was it helpful?

Solution

If your device is above ICS(android 4.0), the additional memory allocation is used for hardware acceleration, in order to improving graphic performance.
In android 3.x, hardware acceleration can be closed by set a flag in AndroidManifest.xml. But in android 4.x, there is no such flag and hardware acceleration is always true if your device support it.

Here is the source.
https://plus.google.com/105051985738280261832/posts/2FXDCz8x93s

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top