how can i see how much memory my app is using out of its VM budget?

℡╲_俬逩灬. 提交于 2019-12-21 09:28:36

问题


I've looked in DDMS but didn't see anything. Thanks.


回答1:


You should have clicked "Update Heap" button in DDMS in Devices view.




回答2:


You see only about 3Mb (which is great btw) because the VM allocates just as much as it needs. If you start loading images in your app you'll see it grow. When it reaches 16 (for 320x480 devices) or 24 (for larger devices) Mb, you'll get an OutOfMemory error




回答3:


sergiu posted some code here: How do I detect the heap size usage of an android application



来源:https://stackoverflow.com/questions/4516645/how-can-i-see-how-much-memory-my-app-is-using-out-of-its-vm-budget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!