How can an Android application use> = 256 MB of RAM?

As far as I know, each Android phone limits all applications to a maximum memory capacity of about 16, 24 or 32 MB. I just saw people discussing the Dungeon Defenders application, which seems to use 256 MB of RAM.

Description of the application: "Minimum requirements: RAM 512 MB (256 free at runtime)" http://www.appbrain.com/app/dungeon-defenders%3A-first-wave/com.trendy.ddapp

A guide on how to make this game work on a Droid (where a custom ROM needs to get 256 MB of RAM to run the game): http://www.forums.trendyent.com/showthread.php?447-How-to-play-Dungeon -Defenders-on-your- Motorola-Droid-Milestone- (root required)

How is this possible? Does anyone know what is going on here? Having access to that large amount of RAM, I would make some of the projects that I am working on much easier to write, so I am very interested to know what this game does.

+3
source share
4 answers

At the droidcon in Berlin, Germany, I heard that you cannot increase the amount of RAM that the application can use on the Dalwick side. You can use all available memory on the home side, so I assume that the named application implemented the large memory material inherent in C using the NDK. This is the only possible solution that I know ...

Update . This was not a conference, it was a visit of Google Lab to my university with Reto Meyer and his colleagues.

+1
source

As far as I know, Android can use more than 256 MB of RAM with 2.2
However, most phones show less than theirs, because there is always a reserve for the system.

0
source

I am using NDK for my application. and for my testing device, when I take more than the 16 MB limit (HTC magic, android 2.2), the application crashes and the system throws exceptions for access to invalid addresses. So no, you cannot use all the memory you want, neither from the native side, nor from the java-managed side.

I read about using different .so libraries and loading them when the application started, but I donโ€™t know how it works, or if it is a viable workaround. Any suggestions?

0
source

If you do not need to display the image in real time, the answer is simple, just send the image to your server using some image processing command, reject it and send it back to Android. If your application requires> 256 MB of RAM, then you will greatly limit the audience, and this is not good.

0
source

Source: https://habr.com/ru/post/1305287/


All Articles