I am using this block of code for determing, actual allocated memory.
ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
MemoryInfo memoryInfo = new MemoryInfo();
activityManager.getMemoryInfo(memoryInfo);
long one=memoryInfo.availMem;
Log.i("memory free1", "" + memoryInfo.availMem);
While creating and asigning String[100] field, I get value 61440. Is it in bytes or kB? Documentation says nothing about it.
Thanks
ActivityManager.MemoryInfo
:
availMem
, totalMem
, threshold
are all in bytes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With