androidandroid-4.2-jelly-beangoogle-nexus

Application occupying Much Memory on Nexus 4.2.1


In my project I am using a few drawables for creating good looking UI and the strange problem I got is it working good on Kindle Fire with 2.3.4 version properly and occupying just 2.8397MB only, but when I run the same application in nexus 4.2.1 device it is taking 23.45678MB to 30MB and running very slowly, I thought the problem would be on drawables so created 9 Patch for them but still getting same problem.


Solution

  • On pre-honeycomb devices (like the 2.3.4 Kindle Fire) bitmaps are stored in native heap, which doesn't show up when analyzing the dalvik heap memory usage in ddms.

    This does not mean that it won't still count against the heap limit, however.

    Honeycomb and later devices store bitmaps in the dalvik heap which will show up in ddms. That should explain why the memory usage is much "less" on the Kindle Fire. It isn't, it just appears that way.