No More Memory Fragmentation on the .NET Large Object Heap

There are two different “types” of heaps in .NET. The Small Object Heap (SOH) and the Large Object Heap (LOH). One of the key differences between the heaps is that the SOH compacts memory and hence reduces the chance of memory fragmentation dramatically while the LOH does not employ compaction. As a result, excessive usage…

4

More Efficiently Debug the Managed Heap Using SOS 4.5

More often than not, when we investigate the managed heap using SOS we use the all powerful !DumpHeap command. It’s an incredibly useful command to get in depth detail on what currently resides on the heap. Let’s look at an example of the abbreviated output from !DumpHeap -stat:         MT    Count    TotalSize Class Name … ……

1

Visual Studio 2012 and Parallel Watch Window

Traditionally, debuggers have been very per thread centric. For example, a debugger most typically will assign a thread to be the current thread and any thread related debug operations you perform will be done on the selected thread. In order to work with a different thread, you need to first switch the thread context. One…

3

Visual Studio 2012 and WinDbg Integration

Microsoft has always provided two primary debugging experience: Visual Studio and Debugging Tools for Windows (a.k.a WinDbg). Each debugger provided a very different debugging experience (both from a capabilities point of view as well as usability). WinDbg was most commonly used when you had the need for low level debugging and was also not very…

15

The Non Blocking Monitor Wait

  One of key things we are taught about lock constructs in general is that a thread will wait indefinitely on a lock to become available before being allowed to continue. Is that always true? Not quite. Let’s take a look at a simple piece of code: private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) { ……

2