[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-14 Thread Streets Of Boston
That's what i do right now. My app does its best to have as much memory as possible before starting to open a big image for editing (i have written a notification-system that caches and other classes can register with. They'll then get notified when bitmap memory is necessary, asking them to free

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread Dianne Hackborn
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

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread Streets Of Boston
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_) 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

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread Dianne Hackborn
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

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread Streets Of Boston
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

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread Dianne Hackborn
On Wed, May 13, 2009 at 1:17 PM, Streets Of Boston flyingdutc...@gmail.comwrote: 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. I don't think that

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread fadden
On May 13, 1:17 pm, Streets Of Boston flyingdutc...@gmail.com wrote: 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. Something to play with: grab

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread Todd
So, how does one programatically determine the amount of heap space free including space used by bitmap memory? Is there such a way? I would prefer to inform my users that there isn't enough memory to load their image rather than getting an OOM and have the app exit.

[android-developers] Re: Question: How to guestimate the available bitmap memory on a device

2009-05-13 Thread Dianne Hackborn
You can always catch the exception. On Wed, May 13, 2009 at 4:59 PM, Todd tdonahue...@gmail.com wrote: So, how does one programatically determine the amount of heap space free including space used by bitmap memory? Is there such a way? I would prefer to inform my users that there isn't