开发者

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 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:

Measuring an Android process memory usage

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜