How Can I Find Out If My Pointers Corrupt a Memory Address?
This topic applies to:
Edition |
Visual Basic |
C# |
F# |
C++ |
Web Developer |
---|---|---|---|---|---|
Express |
Native only |
||||
Pro, Premium, and Ultimate |
Native only |
Problem Description
I think that one of my pointers may be corrupting memory at address 0x00408000. How can I find out what is happening there?
Solution
Check for heap corruption
- Most memory corruption is actually due to heap corruption. Try using the Global Flags Utility (gflags.exe) or pageheap.exe. See https://support.microsoft.com/default.aspx?scid=kb;en-us;286470.
To find where the memory address is modified
Set a data breakpoint at 0x00408000. For more information, see How to: Set a Data Breakpoint (Native Only).
When you hit the breakpoint, use the Memory window to view memory contents starting at 0x00408000. For more information, see Memory Windows.