Android - Is there an SDK way to find out the exact amount of memory consumed by a process identified by its pid?
I would like to 开发者_Go百科check the memory consumption of each running processes individually, cat /proc//statm is ok, but opening a shell for each check is time consuming, and maybe not the best way. any advices how to do it with the SDK?
The short answer is "You can do it, but it's very complicated". Have a look at this similar question, where one of the Android software engineers gives a long discussion of the issue.
精彩评论