I am guessing there is an obvious answer here... I am left confused with this one:
Why do I get 17.8 MiB heap memory allocated when all I have done is:
- Created a simple "Hello World" project with Eclipse's New Project option.
- And added a 56 KiB background image.
If I take out the android:background="@drawable/background4"
line, the allocated memory goes down to 11.9 MiB.
- Is this normal for the system to allocate this much memory? Should I worry about it?
- What would take up this much of the heap?
I also ran a MAT report on it, but I am not sure what conclusion to draw from it:
Thanks in advance,
background
image to thedrawable-nodpi
folder and it will take only1.5mb
of memory – Intendancedrawable-nodpi
folder are not scaled by android. About bitmap size... you have a480x800
image. Each pixel consumes 4 bytes.480 * 800 * 4 = 1536000 bytes ~ 1.5 mb
– Intendance