Reputation: 10129
In my android application I found this message in the logs when the app starts up.
Grow heap (frag case) to 13.781MB for 3271696-byte allocation
This happens soon after setContentView()
is called and even before other part of the app gets executed.
Why does setting a content view take this much memory?
I am not sure what this means. Can some on explain please?
Thanks
Upvotes: 2
Views: 156
Reputation: 6368
There's no easy answer. How large is the content view? Have you ever used the Eclipse MAT? Also, how large is the screen? Is there an ImageView loading a large image? That's about the size of a *1000x1000 image.
Upvotes: 2
Reputation: 3705
setContentView(int res) infilates the layout and adds all top level views you have.
probably images, and other complex views loads your memory this much. consider resizing your images in drawable folder.
Upvotes: 1