Dscribes about in and out of Garbage Collector. How the GC fits in .Net framework, its algorithm and some tips to being friendly with GC. Along with basic understanding of memory management in .Net (Stack vs. Heap). This also depicts about the GC visualization tools and CLR 4.0 GC – Back Ground garbage collector.
4. Stack vs. Heap The Stack is more or less responsible for keeping track of what's executing in our code (or what's been "called"). The Heap is more or less responsible for keeping track of our objects (our data, well... most of it - we'll get to that later.).
17. So, what’s new in the CLR 4.0 GC? "Background" Garbage Collector .NET 4.0 introduces Background GC . The Concurrent GC allocates memory while running but in the current segment which is 16 MB on a workstation. After that all threads are suspended. The Background GC allows a separate ephemeral GC - gen0 and gen1 - to be started while the full GC - gen0, 1, and 2 - is running and that means access to another memory segment. CLR 4.0 changes that to support background collection, which can do a Generation 0 and Generation 1 collection at the same time as a Generation 2 collection. This means that now only unusual circumstances should lead to long latency times.