ActivityManager mActivityManager = (ActivityManager)mApplication.getSystemService(ACTIVITY_SERVICE);
        int memory = mActivityManager.getMemoryClass();
float totalMemory = (float) (Runtime.getRuntime().totalMemory() * 1.0/ (1024 * 1024));
float freeMemory = (float) (Runtime.getRuntime().freeMemory() * 1.0/ (1024 * 1024));
Log.e("内存","最大分配内存:"+memory+"   当前分配的总内存:"+totalMemory+"     剩余内存:"+freeMemory);