Saturday, November 5, 2011

[android-developers] Re: OutOfMemory exception when there should be enough memory left

Yes it's version 2.2 and no nothing native in my code. This bitmap is
a little large I do agree and I don't get this on the first run of the
app. It happens if I restart the activity and that whole bitmap gets
recreated. I think since it nullified before restarting the old one
should be collected before attempting to create the new one but it
seems that it does not collect the old bitmap (Actually all bitmaps
get nullified before restarting so they all should be collected if
necessary).

If the bitmap takes memory then it should OOM while creating the
bitmap. But the OOM gets thrown when creating the int[] which I assume
it's created in DalvikVM and not in the native side.

By any chance could it be the emulator? I use the 2.3.3 emulator.

On Nov 5, 7:51 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote:
> I assume this is on pre honeycomb device.
>
> Do you have any bitmaps in your app or memory that is just in native
> (C/C++) code? Bitmaps take up process memory (that may contribute to
> OutOfMemory (OOM) errors) but the memory is native and isn't known to the
> DalvikVM.
> This means that it looks like you have plenty of memory left (in the
> DalvikVM), but memory used on the native side (by Bitmaps) may force the
> OOM.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate