Professional Visual Studio 2005 Team System (Programmer to Programmer)

In a Windows system, the heap dynamically allocates and manages memory at runtime. Application Verifier specifically checks for access issues and corruption. If you want to detect other kinds of issues, we recommend using the Debug C Run Time (DCRT) library or the Microsoft Foundation Classes (MFC) Debug library. You can learn more on the MSDN website: http://www.msdn.microsoft.com/library/en-us/vccore98/html/_core_memory_management_and_the_debug_heap.asp.

Note

Another great resource for debugging unmanaged applications is John Robbins's excellent book Debugging Applications for Microsoft .NET and Microsoft Windows (Microsoft Press, 2003).

One of the strengths of Application Verifier is that it effectively detects corruption and memory access issues, and does so instantly! The effects of heap corruption are nefarious — a coding mistake can corrupt the heap, which in turn will cause other components to malfunction later because there is a delayed domino effect that is usually difficult to track down. Detecting heap problems without a tool such as Application Verifier can be notoriously difficult.

Depending on the memory conservation settings you picked, you can work with a full or light page heap. The distinction is important because it affects the effectiveness of the heap tests:

Application Verifier will return specific information about an error, including the heap handle, the block address, the size, and the trace description (in some cases, you will also receive a stack trace to help you track down the error). The following list describes some common heap-related stop codes and the techniques you can use to troubleshoot them:

Категории