I don't really know the solution to your problem, but may be a change in approach would help. You have to consider this fact that since it's not a desktop with GBs of run, the memory will eventually run out when you exceed what is provided to you.
This will also happen if you are using a lot of memory on Desktop applications as well. On Jan 17, 5:18 pm, Matthew Fleming <[email protected]> wrote: > Hi, > > I posted earlier about my need to find a way to load a mutable bitmap. > I need to be able to load a bitmap from an input stream, annotate it, > and save it. At present, the only thing I seem to be able to do is > load an immutable bitmap, copy it, annotate the copy, and then save > that. THIS IS NOT A SOLUTION, because then I need memory for two > copies of the bitmap, and I am working with large images. > > COULD SOMEONE FROM GOOGLE PLEASE TELL US WHY the BitmapFactory methods > don't have the option of creating the Bitmap as mutable? A bit heavy- > handed to force the Bitmap to be immutable, don't you think? For that > matter, DOES ANYONE AT GOOGLE PAY ANY ATTENTION TO THIS GROUP? You > post to the Apple Developer groups, you get an answer (even on the > weekend) from a real live person who knows what he's talking about, > and who is (usually) on the Apple payroll. Not here. > > Second question. I figured I would check the available memory before > loading the bitmap, then load it at reduced resolution if necessary. > But Runtime.getRuntime().freeMemory() returns values that make no > sense. For example, if I put this in the onCreate of my first (main) > activity: > long freeMemory = Runtime.getRuntime().freeMemory(); > Log.d("tag",String.valueOf(freeMemory)); > freeMemory = Runtime.getRuntime().maxMemory(); > Log.d("tag",String.valueOf(freeMemory)); > I get a total memory of 16,777,216, but free memory of only 472,824. > This can't be right. > > The above is with the emulator. When I try it with my Samsung Galaxy > Tab, I don't get any information, because Log.d() doesn't seem to work > at all with the actual hardware. Why is that? > > Some real assistance with these problems would be much appreciated. > Google? Anyone home? > > Matthew Fleming, MD > Fleming Dermatopathology, LLC > DermVision, LLC -- 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

