读取Android设备的内存数据- USS,PSS,RSS

final ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
android.os.Debug.MemoryInfo[] memoryInfoArray = am.getProcessMemoryInfo(new int[]{android.os.Process.myPid()});

其中MemoryInfo类提供了API接口帮助我们获取内存数据

USS: getTotalPrivateDirty()

RSS: getTotalSharedDirty()

PSS: getTotalPss()

展开阅读全文

没有更多推荐了,返回首页