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.
-
Iam having the problem only when i connect my device to allocation tracker for observing memory but when iam running under user perspective it is working good with out any problem – Software Sainath Jan 19 '13 at 05:52
-
Can you specify What nexus and kindle are? Kindle fire 5? Nexus 7? Galaxy Nexus? – Jan 19 '13 at 06:04
-
Nexus 7 and kindle fire 6.3 Devices @Glenn – Software Sainath Jan 19 '13 at 06:58
-
Have you tried to view your app's memory usage in application settings? – Jan 19 '13 at 12:34
-
Use DDMS' heap dumps and MAT to determine where your memory is being consumed. Use Traceview to determine where your CPU is being consumed. Do not post StackOverflow questions on memory or CPU usage until you have done these things. – CommonsWare Jan 21 '13 at 18:04
2 Answers
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.

- 11,607
- 3
- 19
- 14
Do you have different drawable
folder per resolution ? if so, it could be that this is related to the resources you have in the different folders so that the drawables loaded on your Nexus are significantly larger than the ones loaded on your kindle fire (The kindle fire has a 1024x600 resolution while the Nexus 7 has a 1280x800 resolution)

- 8,070
- 5
- 54
- 88