Android devices with small heap - android

is there a list of android devices and their heap size?
I know how to check programmatically in the app, but I am curious to know.
I have devices with android heaps 32M and greater, and they have at least 512MB RAM. Could I simply assume that all devices with 512MB Ram have 32M of heap? And that devices with less ram have less heap? (16mb? 24mb? ???)
thanks

is there a list of android devices and their heap size?
Not that I am aware of.
Could I simply assume that all devices with 512MB Ram have 32M of heap?
Heap size recommendations are driven more by Android OS release and screen size. Android OS release and screen size also have an impact on minimum effective RAM on the device. So the concepts are loosely correlated, but that's it.
I'd like a list so I could determine mainly if Android 2.2+ devices with 16mb heap exist
AFAIK, you cannot rule out that combination. After all, please remember that Android is open source, so modded ROMs are welcome to configure heap sizes however they want. IIRC, at least one allows the user to choose the heap size. And there are no rules regarding device RAM or heap size in the Compatibility Definition Document, so device manufacturers are welcome to try odd combinations.

Well, you can't assume absolutely anything. There may be a trend like heaps of size 32mb+ on devices with 512mb+ memory. But that's just a trend, not a rule.

There are sofar 4 different types(based on heap size) of android devices.
Those are:
G1----16MB
Droid-24MB
Nexus one-36MB
XOOM-48MB.
XOOM is the device which has highest heap memory.

A source that could help guessing is also if you create emulators. If you create an emulator for Android 1.5, it doesn't automatically adds the "Max VM application heap size" attribut under hardware. But starting with Android 1.6 it sets it automatically to 24 MB. If you choose Android 4.0.3 then it sets it automatically to 48 MB. Maybe that's some kind of typical minimal heap sizes for these Android versions.
EDIT: Just found this: https://stackoverflow.com/a/2634738/1037994. So combining the emulator attribut with this statement, I would guess 24 MB as minimum for Android 2.2+ devices.

Related

Large Heap Size Difference Between Emulator and Real Device

I am working on and Android app, and have noticed quite a large disparity between the heap size when I use an emulator, and the heap size when I use a real device.
I am using a Nexus 6, and a Nexus 6 emulator to test the app. When I use the real device, my heap size is around 40mb, and allocated is around 23mb.
However, when I use the emulator, my heap doesn't go above 8mb.
Why is there such a large difference?
How large your heap is depends on your device, how much ram it has total and the device manufacturer. You probably set up your emulator with little ram, resulting in that a large heap on the emulator may be smaller than a normal heap on a real device.
Consider this stack overflow post:
Detect application heap size in Android

Hardware acceleration: What happens on pre-Honeycomb devices?

I'm developing an application for Android that supports devices back to Android 2.1 (API Level 7). I'd like to enable hardware acceleration for devices with big screens, because they get a lag in certain situations otherwise. At the same time I have a problem with the memory budget for my application on older devices, because I use a lot of memory for images.
I have read here, that enabling hardware acceleration uses 8 MB more RAM.
Hardware accelerated drawing is not all full of win. For example on
the PVR drivers of devices like the Nexus S and Galaxy Nexus, simply
starting to use OpenGL in a process eats about 8MB of RAM.
As old devices have only 24 MB of RAM per application, this would bring my app into an OutOfMemoryException pretty soon. Newer devices have up to 64 MB per app. So there shouldn't be a problem. My question is now, how hardware acceleration behaves on pre-Honeycomb devices when it's turned on. Does it simply nothing, so don't use the 8 MB RAM? Or does it use this 8 MB RAM anyway, if you have enabled it?
Thanks a lot for your answers.
Cheers Dude
In the meanwhile I have found the answer. It's pretty simple. The android:hardwareAccelerated tag in the android manifest file has been introduced at API level 11. So pre-11 devices cannot understand this tag and therefore they do just nothing.
Cheers

What is the default app heap size on ICS (Android OS4.0)?

I'm trying to make my app ICS-compatible and I'm getting OutOfMemoryErrors that I never got with 2.3.3 and earlier. I don't own an ICS device so I'm using the emulator and I noticed the default heap size is 24M, which is the same as previous versions (on the emulator).
Is 24M the default heap size on actual devices? What about the Google Nexus?
Thanks in advance...
Answering my own question:
I did not find the exact size, in fact it is likely different on different devices, but I can confirm it's bigger than 24Mb after I tested my app on a Google Nexus and didn't get any OOM errors. The emulator probably defaults to 24Mb for all OS versions.

Will the max heap size per-process be increased if OS gets updated?

For example, the original OS version of Nexus One is 2.1 and it has 24MB as the max heap size per-process.
Now, if I update the Android OS of Nexus One to 2.3.3, will its max heap size per-process increased to 32MB?
Thanks.
I think it is specific to manufacturer, device and OS version. AFAIK there is no rule says it should increase. If infrastructure supports, they may increase.

Memory/RAM usage on different devices with same app

I made an android game with cocos2d-android.
When I test this game on different devices, the RAM usage is varied:
Samsung Galaxy Note (2.3.5):
Task-Manager show: about 17MB
Watchdog: about 23MB
Debug: about 10MB (Debug.getNativeHeapAllocatedSize() / 1048576L)
Samsung Galaxy I9000 (2.3.3):
Task-Manager: about 55MB
Watchdog: about 42MB
Debug: about 25MB
Emulator (2.3.3 && 3.2):
Debug: about 40MB
I don't have a clue why the memory consumption on different devices of the same game is varied like this. Has anybody an answer?
Each of those devices are running a different version of Android, and are likely running different types of software in the background.
If your not experiencing any problems, and your users aren't complaining - I dont see anything to worry about.
Samsung Galaxy I9000 has a heap size of 64MB. Galaxy Note has a heap size of 128MB. In the emulator a heap size of 24MB is default but of course you can choose any size.
I am still don't know exactly why the ram usage is that much different, but it seems to have something to do with the bitmaps I use for the game. In the newest version I added low resolution bitmaps for low-end devices. If I turn on the low resolution bitmaps on the I9000 the ram usage is decreasing strongly. If I start the game with low-resolution bitmaps on the galaxy note the ram usage decrease is much smaller, nonetheless the game works smooth on both devices with sd and hd graphics and the user feedback in the android market is positive too.

Categories

Resources