b76efb098b
When running without concurrent marking, the growth policy sets an allocation limit that triggers a blocking GC. When running with concurrent marking, the growth policy sets an allocation limit that triggers the start of concurrent marking, but the mutator will continue to allocate until marking completes. By itself, this would allow the heap to grow far beyond its working set size, so back pressure is applied to the mutator by making it do some incremental marking work in proportion to the amount it allocates. A similar race between mutator and GC exists for concurrent sweep, so make the mutator do some incremental sweeping too.
Cf. 305c3e30c6.
TEST=golem
Bug: https://github.com/dart-lang/sdk/issues/62762
Change-Id: I6f882e6893e1cd3b3591db8cd03b61eb06bfa02f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486828
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>