VC++ Debug内存值

Memory Values

  If you're using the debug heap, memory is initialized and cleared with special values.

  Typically MFC automatically adds something like the following to your .cpp files to enable it:

  #ifdef _DEBUG
  #define new DEBUG_NEW
  #undef THIS_FILE
  static char THIS_FILE[] = __FILE__;
  #endif

  While using the debug heap, you'll see the values:

ValueUsage
0xCDCDCDCD Allocated in heap, but not initialized
0xDDDDDDDD Released heap memory.
0xFDFDFDFD

"NoMansLand" fences automatically placed at boundary of heap memory. Should never be overwritten.

If you do overwrite one, you're probably walking off the end of an array.

0xCCCCCCCC Allocated on stack, but not initialized
 

posted on 2018-02-11 17:01  我来乔23  阅读(220)  评论(0编辑  收藏  举报

导航