How can an Android app use >=256Mb of RAM?

前端 未结 4 1373
说谎
说谎 2021-01-03 08:32

As far as I\'m aware, each Android phones limits all apps to a maximum memory usage of about 16, 24 or 32Mb. I\'ve just seen people discussing the app Dungeon Defenders whic

相关标签:
4条回答
  • 2021-01-03 08:56

    If you do not need to render the image in real time, the answer is simple, just send the image to your server, with some image processing command, render it there, and send it back to Android. If your application requires >256MB RAM then you're going to severely limit a lot of your audience, and that's not good.

    0 讨论(0)
  • 2021-01-03 09:01

    As far as i know Android is able to use more than 256MB of RAM since 2.2
    However most phones shows less than they have, because there is always some Ram reserved for the system.

    0 讨论(0)
  • 2021-01-03 09:11

    I'm using NDK for my app. and for my testing device when i take more than the 16mb limit (HTC magic, android 2.2) the app crashes and the system throws exceptions for invalid addresses access. So no, you can´t use all the memory you want neither from native side or from the java-managed side.

    I've read about using different .so libraries and load them when running your app, but i dont know how it works or if its a viable workaround. Any suggestions?

    0 讨论(0)
  • 2021-01-03 09:12

    On the droidcon in Berlin, Germany, I heard that you can't increase the amount of RAM an application can use on the dalvik side. You can use all available memory on the native side so I guess the named application have implemented heavy memory stuff native in C using the NDK. Thats the only possible solution I know...

    Update It wasn't the conference, it was a Google Lab visit at my university with Reto Meier and colleagues.

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