开发者

View ddms heap size

开发者 https://www.devze.com 2023-03-01 01:48 出处:网络
In relation to this topic Android: OutofMemoryError.... How Can you see the heap size on ddms (Eclipse)? I c开发者_如何转开发an only track allocations and it doesn\'t show nothingYou can try from cod

In relation to this topic Android: OutofMemoryError....

How Can you see the heap size on ddms (Eclipse)? I c开发者_如何转开发an only track allocations and it doesn't show nothing


You can try from code native heap allocation : Debug.getNativeHeapAllocatedSize()


this shows max heap memory of device

Runtime rt = Runtime.getRuntime();
long maxMemory = rt.maxMemory();

this is for heap required by your app

Runtime rt = Runtime.getRuntime();
long maxMemory = rt.maxMemory();
0

精彩评论

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