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
3 files changed
tree: 55c5221d3cf39308d1bb03d8c7efb102ba8af26e
  1. .gitignore
  3. build/
  4. dalvikvm/
  5. jdwpspy/
  6. src/
  7. test/
  8. tools/