Fix infinite loop for UOH allocations with hardlimit in Server GC (#38071)
authorMaoni Stephens <Maoni0@users.noreply.github.com>
Thu, 18 Jun 2020 20:50:58 +0000 (13:50 -0700)
committerGitHub <noreply@github.com>
Thu, 18 Jun 2020 20:50:58 +0000 (13:50 -0700)
commita86d884e9e335476ec1c4ded8a0781ab184f8aee
treee55ab740c927b60efcfce7e03c39d2db0e228423
parentf31f9f8849a77306ca8c605a27cf7ac635e6987c
Fix infinite loop for UOH allocations with hardlimit in Server GC (#38071)

In Server GC when we allocate UOH objects and decide whether we should retry
when hardlimit is in effect we have an inconsistency between should_retry_other_heap
and virtual_commit. The former uses current_total_committed - current_total_committed_bookkeeping while the latter uses current_total_committed.
This causes us to be in a situation where we may have an infinite loop
since the allocate_uoh says to retry but virtual_commit fails.
src/coreclr/src/gc/gc.cpp