Commit bdd0fb9b authored by Mathieu Chartier's avatar Mathieu Chartier
Browse files

Improve sticky GC ergonomics

Before we scheduled a partial GC after 10 sticky GC had been run to
prevent excessive heap growth and fragmentation. The issue with this is
that it was just a ballpark estimate which was not based on reality. The
new behaviour has that we do sticky GC until we have less space remaining
than minimum free after the GC. When this occurs, we set the next GC to be a
partial GC. After a partial / full GC we grow the heap and set the next GC to
be a sticky GC. This prevents the heap from always growing more than the target
utilization, while ensuring that we do sticky GC often.

dumpsys meminfo: ~450Mb -> 420Mb. Slight slowdown in GCBench.

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