开发者

Android - determining Max Heap Size per App for a device [duplicate]

开发者 https://www.devze.com 2023-03-22 09:24 出处:网络
This question already has answers here: Detect application heap size in Android (9 answers) 开发者_开发技巧
This question already has answers here: Detect application heap size in Android (9 answers) 开发者_开发技巧 Closed 10 years ago.

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();

0

精彩评论

暂无评论...
验证码 换一张
取 消