This is the maximum heap size:
http://developer.android.com/reference/android/app/ActivityManager.html#getMemoryClass()


Also see:
http://developer.android.com/reference/android/app/ActivityManager.html#getLargeMemoryClass()


On Sun, Jun 24, 2012 at 2:56 AM, Francisco M. Marzoa Alonso <
fmmar...@gmail.com> wrote:

> Hi there,
>
> I have read that the maximum heap available for an app is 16M, despite
> that there may be higher on newer devices.
>
> Anyway on a 2.1 emulator with Eclipse/DDMS my available heap shown is
> just about 3M, while in  my SGS2 real device shows about 5M of available
> heap. As you see, a lot of lower than 16M.
>
> My app runs fine on my SGS2, but it crashes complaining about not having
> sufficient heap memory on the emulator, and I have received a few
> reports with the same error on Google Play.
>
> I am currently doing an effort to decrease heap consumption, but I
> wonder why DDMS shows values so low and if some devices may actually
> have less than 16M of heap memory.
>
> My app is developed for Android 2.1+
>
> Best regards,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to