原文:http://mingkg21.iteye.com/blog/605846
private String getAvailMemory( ){
ActivityManager am = (ActivityManager) getSystemService( Context.ACTIVITY_SERVICE );
MemoryInfo mi = new MemoryInfo( );
am.getMemoryInfo( mi );
return Formatter.formatFileSize( context, mi.availMem );
}