Android Profiler vs Java API level memory calculation

给你一囗甜甜゛ 提交于 2019-12-06 03:45:30

问题


  1. AFAIK android assigns heap limit based on OEM or Screen resolution of device and RAM it self. ex: samsung s5 128mb is limit. How to get current memory usage in android?

  2. Whereas the android Profiler shows that my app is eating more memory than > 128.

OutOfMemory

Line 160185: 12-08 11:22:18.332 I/art     (11728): Alloc partial concurrent mark sweep GC freed 0(0B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 2.012ms total 240.841ms
Line 160325: 12-08 11:22:18.652 I/art     (11728): Clamp target GC heap from 143MB to 128MB
Line 160327: 12-08 11:22:18.652 I/art     (11728): Alloc concurrent mark sweep GC freed 0(0B) AllocSpace objects, 0(0B) LOS objects, 0% free, 127MB/128MB, paused 2.378ms total 314.229ms
Line 160675: 12-08 11:22:19.102 I/art     (11728): Clamp target GC heap from 143MB to 128MB
matches the 128mb limit

Queries:

a. Hows to relate Profiler Memory vs Java API heap memory used?

b. Is it Profiler java memory == Java API heap memory used as above #1.

c. How to relate Profiler Memory vs Java API heap memory used vs Device settings memory usage by an app?

d. Is it possible to know JavaScript(Cordova based webview app), native level heap usage?

Thanks

Nithin

来源:https://stackoverflow.com/questions/47714637/android-profiler-vs-java-api-level-memory-calculation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!