获得黑莓总内存 [英] Get total memory usage in blackberry
本文介绍了获得黑莓总内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能得到所有运行的应用程序的总内存使用情况?基本上,我想找到的内存使用量是否大于30%以上。
How can I get the Total memory usage by all running applications? Basically I want to find whether the memory usage is greater than 30% or above.
推荐答案
由于拉斐尔的建议,你可以使用的内存类。更具体地说,可以使用下面这将帮助你:
As suggested by Rafael, you can make use of the Memory class. More specifically, you can use the following which will help you:
Memory.getRAMStats().getFree();
Memory.getRAMStats().getAllocated());
如果你比较两个数学上,你可以从该百分比。
If you compare the two mathematically, you can get the percentage from that.
这篇关于获得黑莓总内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文