//获得MemoryInfo对象 MemoryInfo memoryInfo = new MemoryInfo() ; //获得系统可用内存,保存在MemoryInfo对象上 activitymanager.getMemoryInfo(memoryInfo) ; long memSize = memoryInfo.availMem ; //当前系统可用内存 long thre=memoryInfo.threshold; //系统内存阙值