Waypoint
Waypoint

Reputation: 17743

Android memoryInfo values

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

Upvotes: 4

Views: 1479

Answers (1)

Dan  Meng
Dan Meng

Reputation: 214

ActivityManager.MemoryInfo: availMem, totalMem, threshold are all in bytes.

Upvotes: 3

Related Questions