Android 内存 - 获取单个应用内存限制
方法一:
adb shell getprop | grep dalvik.vm.heapgrowthlimit [dalvik.vm.heapgrowthlimit]: [64m]
方法二:
ActivityManager activityManager =(ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE); activityManager.getMemoryClass(); activityManager.getLargeMemoryClass();
方法三:
adb shell cat /system/build.prop dalvik.vm.heapstartsize=8m dalvik.vm.heapgrowthlimit=64m dalvik.vm.heapsize=256m
方法四:
Runtime.getRuntime().maxMemory()
作者:氧气之吻