On Sep 9, 11:27 am, Dianne Hackborn <hack...@android.com> wrote:
> Of course it can grow the heap.  It will also use mmap for allocations over
> 64K so they aren't in the main heap at all.  (Fwiw, the allocator is a
> somewhat modified version of the standard dlmalloc.)

I should have said more clearly that in the case of these external
allocations it's acting like it can't grow the heap--i.e. there's a
hard limit that it hits against.  Why is that the case?  As many
threads on this subject for the last year have attested to, it's not a
question of hitting the overall heap limit, it's a question of the
external allocation failing due to some other limit that doesn't seem
to be flexible.

> The standard maps app uses the same library, and at this point doesn't have
> such problems as far as I know.  My guess is that put together your app is
> just using too much memory.

What is too much memory?  Our allocated memory varies between about
3-5 MB, and allocations fail at various times when memory is at
various points.  Isn't it a question not of overall memory usage but
of hitting whatever heap limit the external allocations care about?

I'm not saying there's a bug in the map framework, I'm saying there's
a problem with the external allocation design.  I think I saw Andy
refer to it as a "hack" elsewhere, and it is clearly a problem for
very many applications.  When it's my code I can try to work around
it, and I've successfully done that in another app by retrying
allocations, freeing memory and GCing in between retries.  But I have
no control over the map framework or any other code that is stumbling
over this limitation, and that's the big problem.

--~--~---------~--~----~------------~-------~--~----~
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