largeHeap=true manifest tag not working?

前端 未结 2 1462
独厮守ぢ
独厮守ぢ 2020-12-05 08:11

I´m developing a very memory-consuming app and want to use the largeHeap-Tag, which should give the application a bit more memory. Whatever I set this tag in AndroidManifest

相关标签:
2条回答
  • 2020-12-05 08:13

    Indeed, the large heap will be the same as normal heap until your app needs more memory for a task. Your VM will display such messages on console:

    06-30 15:38:14.770: INFO/dalvikvm-heap(9075): Grow heap (frag case) to 42.365MB for 6152016-byte allocation
    06-30 15:38:16.680: INFO/dalvikvm-heap(9075): Grow heap (frag case) to 39.739MB for 3517456-byte allocation
    
    0 讨论(0)
  • 2020-12-05 08:39

    Use ActivityManager.getMemoryClass() and ActivityManager.getLargeMemoryClass() to verify the approximated values assigned to your app.

    0 讨论(0)
提交回复
热议问题