2

From one of Google's presentations, I came to know that the maximum Heap Size for the various hardwares are as follows - "Android G1 = 16MB, Droid = 24 MB, Nexus One = 32 MB, Xoom = 48 MB"

Is there a programmatic method to determine the maximum Heap Size per App, for an Android App on a specific hardware ?

Thanks.

trincot
  • 317,000
  • 35
  • 244
  • 286
mastDrinkNimbuPani
  • 1,249
  • 11
  • 14
  • This has been answered here: http://stackoverflow.com/questions/2630158/detect-application-heap-size-in-android – Carl May 28 '12 at 08:50

1 Answers1

10

As mentioned here You need to call:
long heapSize = Runtime.getRuntime().maxMemory();

sandrstar
  • 12,503
  • 8
  • 58
  • 65