Android - determining Max Heap Size per App for a device [duplicate]
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.
As mentioned here You need to call:
long heapSize = Runtime.getRuntime().maxMemory();
精彩评论