com.jaredrummler.android.processes.models.Statm Java Examples
The following examples show how to use
com.jaredrummler.android.processes.models.Statm.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TaskController.java From batteryhub with Apache License 2.0 | 5 votes |
private double getMemoryFromProcess(AndroidAppProcess process) { double memory = 0; try { Statm statm = process.statm(); if (statm != null) { // Memory in MB memory = statm.getResidentSetSize() / 1024.0 / 1024.0; } } catch (IOException e) { e.printStackTrace(); } return Math.round(memory * 100.0) / 100.0; }