Currently IncrementalCollectSlice() determines whether it should do an incremental collection or not by checking whether the slice budget is unlimited, unless any of the incremental zeal modes are in effect in which case it will always perform an incremental slice as determined by the zeal mode. BudgetIncrementalGC() sets the budget to unlimited to prevent an incremental GC in situations where it is not safe to do so. This is therefore ignored when these zeal modes are in effect. The solution is to pass a dummy slice budget that is not unlimited for the zeal mode GCs. If the budget is later set to unlimited by BudgetIncrementalGC this will then be respectected.
Created attachment 647573 [details] [diff] [review] Proposed fix