Get total memory usage in blackberry

99封情书 提交于 2019-12-14 03:59:07

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/7595427/get-total-memory-usage-in-blackberry

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