0

Does every android app allocated 16MB even if its size is less for example only ~2MB. As below documentation says:the baseline Android memory class is 16

int getMemoryClass () Return the approximate per-application memory class of the current device. This gives you an idea of how hard a memory limit you should impose on your application to let the overall system work best. The returned value is in megabytes; the baseline Android memory class is 16 (which happens to be the Java heap limit of those devices); some device with more memory may return 24 or even higher numbers.

Ashish Rathee
  • 449
  • 3
  • 16
  • I think took it wrong way.. Is it when ever you call getMemoryClass () you are sure you will get minimum value as 16mb... – Ashish Rathee Oct 19 '16 at 16:02

1 Answers1

0

As the docs say, it just gives an idea, of how much memory is needed. It is not the actual memory, that is allocated for the app. To get the currently used memory, you could check out this question!

Community
  • 1
  • 1
Dario
  • 582
  • 1
  • 5
  • 17