Commit 1c9d0ab2 authored by Carl Shapiro's avatar Carl Shapiro
Browse files

Wait for the GC to quiesce before attempting foreground GCs.

Previously, dvmTrackExternalAllocation waited for the GC to complete
before retrying its allocation.  However, there is no guarantee that
the GC will not be active at the time we are woken.  Furthermore, the
code did not revalidate that the external allocation is still
possible, an assumption made by all externalAlloc calls.

With this change, the code loops until the GC is no longer active,
validates that the allocation is still possible, and then proceeds
with its routine for allocating additional storage.  In addition, if
we try a few heroic measures to establish the externalAllocPossible
invariant rather than immediately failing the call.

Change-Id: I2e3b8a6c9fab617990edc085f52d0df35ad6d0f6
parent 69259715
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment