81143e16c4
These GCs usually did not free very much memory but did consume a lot of CPU. They would on low-powered, low-memory devices often take ~1s, during which time the OS might decide the OOM signal wasn't working and kill us before the compaction can complete and free pages. Instead, only release pooled memory. Also use more appropriate GCReasons in calls of CollectMost/AllGarbage. TEST=ci Bug: b/216333343 Change-Id: Ia56b9ca409410f17d40508c69fb1bc9df0ce4028 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235300 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>