Abstract
In this chapter, we will examine the .NET garbage collector (GC), one of the primary mechanisms affecting the performance of .NET applications. While freeing developers from worrying about memory deallocation, the GC introduces new challenges for constructing deterministically well-behaving programs in which performance is paramount. First, we will review the types of GC available in the CLR, and see how adapting an application to the GC can be very beneficial in terms of overall GC performance and pause times. Next, we’ll see how generations affect GC performance and how to tune applications accordingly. Toward the end of the chapter we will examine the APIs available for controlling the GC directly, as well as the subtleties involved in correctly using nondeterministic finalization.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 Sasha Goldshtein, Dima Zurbalev, and Ido Flatow
About this chapter
Cite this chapter
Goldshtein, S., Zurbalev, D., Flatow, I. (2012). Garbage Collection. In: Pro .NET Performance. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4459-2_4
Download citation
DOI: https://doi.org/10.1007/978-1-4302-4459-2_4
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4458-5
Online ISBN: 978-1-4302-4459-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)