SDP December 2014: State of the Platforms & Visual Studio Diagnostics Hub

December 31, 2014

It's been an incredibly busy month, preparing for my last conference of 2014 -- SELA Developer Practice. It's still ongoing, and we had to spill a few workshops to next week because registration numbers exceeded our expectations -- again. What a good problem to have. I've had the pleasure of delivering a keynote, a breakout session, and two workshops at the conference. Below are the materials for the shorter sessions. Thanks for coming, and one more thing: we're thinking about relocating the November 2015 conference to sunny Eilat. What do you think? Keynote: State of the Platforms Slides This is my usual update...
tags: ,
no comments

Diagnosing Native Memory Leaks with ETW and WPA

December 2, 2014

As a followup to my previous post on native memory leaks, here's a quick walkthrough for diagnosing memory leaks using Event Tracing for Windows. The process is fairly simple. The Windows heap manager is instrumented with ETW traces for each memory allocation and deallocation. If you capture those over a period of time (when your application is leaking memory), you can get a nice report of which blocks were allocated during the trace period and haven't been freed. If you also ask ETW to capture the call stack for allocation events, you can see where the application is allocating...

Native Memory Leak Diagnostics with Visual Studio 2015

December 1, 2014

The Current Landscape of Native Memory Diagnostics Leak diagnostics is a nasty business in native applications. There have been many attempts at solving this problem automatically. To name a few: The CRT Debug Heap (which is no longer used by default in Visual Studio 2015! - See update below.) can help identify memory leaks by associating each allocation with additional data on the allocating source file and line number. At program exit (or whenever a special CRT function is called), all blocks that haven't been freed are printed out. This has been around forever. The problem is that you need to...