No GCs for your allocations?

Several people mentioned Java’s “no GC” GC proposal and asked if we can add such a thing. So I thought it deserves a blog post. Short answer – we already have such a feature and that’s called the NoGCRegion. The GC.TryStartNoGCRegion API allows you to tell us the amount of allocations you’d like to do and when you stay within it, no GCs will be tr...