title: What are the debug memory fill patterns in Visual Studio C++ and Windows?
body: <p>In Visual Studio, we've all had "baadf00d", have seen seen "CC" and "CD" when inspecting variables in the debugger in C++ during run-time.</p>
  
  <p>From what I understand, "CC" is in DEBUG mode only to indicate when a memory has been new() or alloc() and unitilialized.  While "CD" represents delete'd or free'd memory.  I've only seen "baadf00d" in RELEASE build (but I may be wrong).</p>
  
  <p>Once in a while, we get into a situation of tacking memory leaks, buffer overflows, etc and these kind of information comes in handy.</p>
  
  <p>Would somebody be kind enough to point out when and in what modes the memory are set to recognizable byte patterns for debugging purpose?</p>