Android out of memory when assigning variables

后端 未结 3 1934
北恋
北恋 2020-12-19 11:38

So I get this:

\'01-01 20:37:34.859: E/dalvikvm-heap(19921): Out of memory on a 6471856-byte allocation.\'

When trying to assign a bunch of

3条回答
  •  鱼传尺愫
    2020-12-19 12:20

    In Android Memory Management, every app has a Maximum Heap memory it can use , once the app uses more than the heap memory Android OS will automatically kill's the app. So only you are getting "Out of Memory Exception"..

    To solve this you can go for NDK concept of Android.. Since the heap concept is for the SDK part..

    i.e,

    you can make a App uses more than 300MB (if available) of RAM using NDK but not possible in SDK

提交回复
热议问题