The Garbage Collector Manages my Memory

Profiling a .NET application with the Concurrency Visualizer in Visual Studio 11
Developer Preview has a less noisy Synchronization profile report than in Visual Studio 2010. The reason is because synchronizing with
the thread driving garbage collection is now categorized as Memory Management.
Without this re-categorization, the Synchronization profile report can list out
any method as having been blocked by Synchronization, even if it doesn’t have
any code which block, locks or synchronizes. The reason is because when a
thread is performing garbage collection it needs to wait for all of the other managed
threads to pause. So at any point, a thread can get “paused” by the RareDisablePreemptiveGC,
or HijackThread methods. While it is good to know how often threads are being
paused for Garbage Collection, visualizing that can distract from non-GC
synchronization. To view either the Synchronization of Memory Management profile reports, click on their respective labels under Visible Timeline Profile, in the lower left hand corner of the Threads view. So with pausing for Garbage Collection now categorized as Memory
Management, the Synchronization profile report does a better job on reporting
where the threads in the process were actually synchronizing.

Comments (2)

  1. i like old delete and new keywords style! i use new and Dispose or collect in Managed applications!

  2. Jo says:

    Well, aren't you special?  And silly…

Skip to main content