commit | 930e26f0f59c0ce1020524269c82492f3c4ea722 | [log] [tgz] |
---|---|---|
author | Mathieu Chartier <mathieuc@google.com> | Tue Jan 28 14:28:09 2014 -0800 |
committer | Mathieu Chartier <mathieuc@google.com> | Tue Feb 04 14:02:02 2014 -0800 |
tree | 7366e667b03cb55e5c25aeb4197f1a30ac4abbb3 | |
parent | bfb883abadbf7e914cdac55d22d28a1c8286979b [diff] |
Avoid running Runtime.gc() until we need to run finalization. This prevents excessive explicit GC which are called from apps to get good GC behavior on Dalvik. Calling System.gc() does not help on ART since GC for alloc is much rarer. If running finalizers is requested following a System.gc we remember that a GC was requested and perform it ahead of finalization. Bug: 12004934 Change-Id: Id1343ce8b5378c5f53c1e5649c06ddd045f56a3b