The OutOfResources you see in the log is actually from the graphics system, which on many devices has a global pool of memory for window surfaces, typically around 16MB.
First, that message can be normal, if the system is just finding it needs more memory for the foreground and is hunting for background things to kill. If you really are running out of such memory in your app, you are using a pretty excessive amount of surface memory, and should check to make sure you aren't leaking a large number of windows and such. "adb shell dumpsys window" can be your friend for this. On Thu, Aug 19, 2010 at 12:00 PM, Luca Carlon <[email protected]> wrote: > So no way of increasing it. And what about the option of separating > into different applications? I mean, if I have one application using > the GLSurfaceView and another with the VideoView, and I make the > second start when a specific intent is broadcasted from the first, > would I have two different spaces each 16MB or 24MB? > Thanks you very much for the information you provided! > > On 19 Ago, 18:26, Romain Guy <[email protected]> wrote: > > If you don't have enough memory in your app you must modify it to work > > with this limit. > > > > > > > > On Thu, Aug 19, 2010 at 2:03 AM, Luca Carlon <[email protected]> > wrote: > > > And would it be possible to increase the amount of RAM available? > > > Would creating a different application which receives intents from the > > > first one be a solution to the problem of insufficient RAM for a > > > process? > > > Thanks for your answer! > > > > > On Aug 19, 7:50 am, Romain Guy <[email protected]> wrote: > > >> An app can only use 16 or 24 MB of RAM, depending on the device. A > > >> VideoView or a GLSurfaceView takes up a lot of RAM by the way (a > > >> fullscreen surface view requires width*height*2*2 bytes of memory for > > >> instance - if it's 16 bits.) > > > > >> On Wed, Aug 18, 2010 at 10:41 PM, Luca Carlon <[email protected]> > wrote: > > >> > Hi! I have an activity which uses a GLSurfaceView to render some > > >> > graphics. Now, I created another activity, which is started from the > > >> > first when pressing a button, which plays a video using a VideoView. > > >> > The problem is that, for some reason, very often I get a > > >> > OutOfResources exception from the Surface, and in the logs I even > see > > >> > some messages saying "Out of memory". I can hardly believe I have > not > > >> > enough memory to load everything... Does an application have any > limit > > >> > in size? Any other idea what can be causing this? Any help is really > > >> > appreciated! > > >> > Thanks! > > > > >> > -- > > >> > You received this message because you are subscribed to the Google > > >> > Groups "Android Developers" group. > > >> > To post to this group, send email to > [email protected] > > >> > To unsubscribe from this group, send email to > > >> > [email protected]<android-developers%[email protected]> > > >> > For more options, visit this group at > > >> >http://groups.google.com/group/android-developers?hl=en > > > > >> -- > > >> Romain Guy > > >> Android framework engineer > > >> [email protected] > > > > >> Note: please don't send private questions to me, as I don't have time > > >> to provide private support. 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 > [email protected] > > > To unsubscribe from this group, send email to > > > [email protected]<android-developers%[email protected]> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > Romain Guy > > Android framework engineer > > [email protected] > > > > Note: please don't send private questions to me, as I don't have time > > to provide private support. 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 [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

