According to the heap 'browser' that comes with the ADT plugin in
Eclipse.
My app is using less than 4MByte (it's using about 2MByte) but it
won't allow me to create a bitmap of 12MByte.

About max heap usage: Is and will the heap limit be set to 16MByte on
all devices (i.e. on current devices such as G1, Magic and also on
possible future android devices)?

On May 13, 2:37 pm, Dianne Hackborn <hack...@android.com> wrote:
> According to what heap dump?  I am pretty sure that the code just checks to
> see if there is that amount of space left in the java heap, and if not fail
> (otherwise allocate it and tell the VM to account for that as part of its
> heap usage).
>
> On Wed, May 13, 2009 at 11:24 AM, Streets Of Boston <flyingdutc...@gmail.com
>
>
>
>
>
> > wrote:
>
> > Hi Dianne,
>
> > Thanks for your response.
>
> > I know that there is no real thing like bitmap memory.
> > But i also know that when i open a 12MByte bitmap (3MPixel, ARGB_8888)
> > i *always* get a OOM error. Even if i have more than 12MByte left to
> > work with, according to the heap dump.
>
> > I'm asking if there is a way to 'guesstimate' the amount available
> > that is left for opening (creating) bitmaps.
>
> > On May 13, 2:07 pm, Dianne Hackborn <hack...@android.com> wrote:
> > > There is no such thing as "bitmap memory" really.  Bitmap allocations are
> > > accounted against your app's overall memory, which is limited to 16MB.
>
> > > On Wed, May 13, 2009 at 10:35 AM, Streets Of Boston <
> > flyingdutc...@gmail.com
>
> > > > wrote:
>
> > > > Hi,
>
> > > > Part of my application allows the user to color-correct images. When i
> > > > open an image for editing, i'd like to know what, more or less, the
> > > > available bitmap memory is for the device that the app is running on.
>
> > > > For the G1, the limit is use is about 6MByte (about a full-size image
> > > > that can be taken by the phone (3MPixels) with 16 bit color ==>
> > > > 6MByte). If i try to open anything larger, i often get an out-of-
> > > > memory exception. Limiting it to 6MByte reduces these OOM exceptions
> > > > by a great deal. However, i can see future devices having more memory
> > > > available because (as one of the reasons) they can take larger pics
> > > > (e.g. 5MPixel or something).
>
> > > > Right now, my app just uses a hard-coded limit of 6*1024*1024. Is
> > > > there a way to make this variable, to future-proof this by examing the
> > > > device my app is running on. If so, how?
>
> > > > Thanks!
>
> > > --
> > > 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.- Hide quoted text -
>
> > > - Show quoted text -
>
> --
> 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.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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