デバッグにおけるメモリ
VC++でデバッグしていると、0xcdcdcdcdや0xfdfdfdfdなどに変わってしまうポインタがあります。
これらの値には意味があります。
Troubleshooting Common Problems with Applications: Debugging in the Real World(英語)
の内容を見ると、
0xfdfdfdfd
No man's land (normally outside of a process)(アクセスしちゃいけないところ)
0xdddddddd
Freed memory(開放済みメモリ。Win2Kだと0xfeeefeeeらしい)
0xcdcdcdcd
Uninitialized (global)(未初期化のポインタ)
0xcccccccc
Uninitialized locals (on the stack) (未初期化のスタック上のポインタらしい)
ということらしい。(ただ、気になるのは翻訳サイトで訳したら他にもまだありそうなかんじの文章があったこと。)
この辺のことをしっかりと分かっていないと、結構面倒なことになりそうですね。
リリースではこれらは不定らしいです。
参考資料
Troubleshooting Common Problems with Applications: Debugging in the Real World(英語)
VC デバッグ版の変数初期化機能について
hjm/記/Microsoft Visual C++/デバグ