On Apr 14, 12:46 am, Liangtao <[email protected]> wrote:
> The function doesn't try to do GC whenever "externalAllocPossible(hs,
> n)" returns false. How about simply moving this call to the beginning
> of function "static bool externalAlloc(HeapSource *hs, size_t n, bool
> grow)"?

(From http://code.google.com/p/android/issues/detail?id=2426 )

--
As I understand it, the "external" allocations don't bump up against
the current heap
*contents* but rather the current heap *limit*.  That is, if you have
5MB of objects
in a heap that was forced to expand to 8MB at some point, your
external allocation
limit is 8MB, not 11MB.

The VM could try to GC to see if the resulting heap is small enough to
reduce the
soft limit, but since the current implementation doesn't do compaction
that's not likely.

The external allocation mechanism is a hack.
--

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

Reply via email to