My App is taking 250mb memory on my device. When I do a heap dump and analyze it. it says the heap size around 7mb
Asked Answered
P

1

3

Is there another memory which is being used that doesn't show on a heap dump? I am using Memory Analyzer on Eclipse. First I dump the heap with DDMS and Memory Analyzer picks. it only shows that the size of the heap is 7mb and the histogram is basically telling me everything is fine. However, I have downloaded several memory monitoring apps on my device and they all say my app is taking 250mb and it keeps climbing.

How else can I try to find out why its taking so much memory?

enter image description here

enter image description here

Partlet answered 30/9, 2013 at 11:35 Comment(3)
Do you think you are using big size images in your app?Almondeyed
@ketan Yes a have a listview with images in it. theyre fairly big yes around 600pixels width and heightPartlet
The heap is a portion of the memory used. In small applications it can be a fraction of all the memory assigned.Gynaeceum
P
4

Memory measuring apps are not worth very much, as, to quote Dianne Hackborn:

Note that memory usage on modern operating systems like Linux is an extremely complicated and difficult to understand area. In fact the chances of you actually correctly interpreting whatever numbers you get is extremely low.

That being said, you are welcome to use the techniques outlined in her answer to try to get a better handle on what those tools are claiming and whether it is really a problem.

Also:

  • If you have more than one process, bear in mind that DDMS' heap dump is for a single process

  • If you are doing native development using the NDK, NDK allocations are not part of the managed heap and therefore are not included in the heap dump

Puny answered 30/9, 2013 at 11:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.