Re: track memory overwrites in C++




> Is Visual Studio 2005 able to track memory overwrites in C++ in the
> debug environment?
>
> Any option or property switch available for such a mechanism?
>

What kind of memory overwrites do you mean?

If you mean heap overwrites (as well as other heap corruptions), it is better
to debug them with PageHeap, which is available in Windows since Win2000:
http://www.debuginfo.com/tips/userbpntdll.html

For debugging stack-related issues (including some cases of overwrites),
you can use /RTC* and /GS compiler options.

For debugging overwrites of an arbitrary place of memory, you can use
data breakpoints:
http://msdn2.microsoft.com/350dyxd0(en-US,VS.80).aspx

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]





.


Loading