获得可利用内存

MemoryInfo mi = new MemoryInfo(); 
ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); 
activityManager
.getMemoryInfo(mi); 
long availableMegs = mi.availMem / 1048576L; 

你可能感兴趣的:(内存)