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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As suggested by Rafael, you can make use of the Memory class. More specifically, you can use the following which will help you:
If you compare the two mathematically, you can get the percentage from that.