Measuring an Android process memory usage
What is the correct way to measure an android process memory usage? The Allocated memory after GC? Or should i look at something else?
Edit 2: With correct way = should i measure using heap dump or should i use USS+PSS values? Why measure using USS when allocated memory in my opinion is a better way?
Edit: TY, and yes i've already looked at this answer. Though i realy cant find an answer for my question in that post. Quote: "So how much memory a processes uses is really not clear". (because the shared ram is hard to calculate?) What is the most accepted solution?
Im looking at this post: http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html. If you show heap updates on your application then cause a GC you get some memory info: 3.bp.blogspot.com/-VojtZFBXA3E/TYryrWDJLQI/AAAAAAAAAS4/hl5aecZuMXg/s1600/ddms-heap-usage.png There you have The Allocated memory after GC, whats wrong looking at that number?
Ive also looked at http://kohlerm.blogspot.com/2009/02/how-to-really-measure-memory-usage-of.html and dumped the hprof and loaded it in Eclipse memory Analyzer. Looking at the "The retained size" for my application, wouldnt that be a number to look at? Dosent that mean if i kill my process, this much memory would be freed? Isnt that the definition of USS?
Thanks, and sorry if my first question wasnt clear.
链接地址: http://www.djcxy.com/p/80166.html上一篇: 如何衡量代码或过程的累积内存使用情况?
下一篇: 测量Android进程内存使用情况