Get total memory usage in blackberry
How can I get th开发者_如何转开发e 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.
精彩评论