2

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 really can't 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?

I'm looking at this post: memory-analysis-for-android. 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, what's wrong looking at that number?

Ive also looked at: how-to-really-measure-memory-usage-of and dumped the hprof and loaded it in Eclipse memory Analyzer. Looking at the "The retained size" for my application, wouldn't that be a number to look at? Dosen't that mean if I kill my process, this much memory would be freed? Isn't that the definition of USS?

Thanks, and sorry if my first question wasn't clear.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Tom
  • 109
  • 2
  • 9

0 Answers0