Browse - programming tips - borland check heap corruptDate: 2010apr21 Language: C/C++ Platform: Borland C++ Keywords: malloc, free Q. My heap is being corrupted somehow, how can I locate where? A. Sprinkle calls to heapcheck() around your code to narrow down the location. Example from the help file: #include <malloc.h> if (heapcheck() == _HEAPCORRUPT) printf( "Heap is corrupted.\n" ); else printf( "Heap is OK.\n" ); There is also a _heapchk() function.
Add a commentSign in to add a comment |