How to use _crtBreakAlloc to debug a memory allocation (151585)
The information in this article applies to:
- The Integrated Debugger, when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q151585 SUMMARY
When tracking down memory leaks using the debug C-Runtime (CRT), it is
often useful to set a breakpoint immediately before allocating the memory
that causes the leak. By setting _crtBreakAlloc at either compile time or
run-time, you can cause a user-defined breakpoint at a specific point of
memory allocation.
Modification Type: | Major | Last Reviewed: | 9/30/2005 |
---|
Keywords: | kbBug kbCRT kbDebug kbhowto kbide KB151585 kbAudDeveloper |
---|
|