Mail Archives: djgpp/1995/01/31/22:24:28
Others have already replied pointing out how you may be causing this
crash if your program overwrites malloc buffers. The malloc.c in the
source part of the djgpp distribution can be easily recompiled
to include more consistency checking (i.e. checking that blocks
passed to free have come from malloc, and looking at the linked lists)
as well as including extra routines which you can call which do
things like dump the linked list of malloc'ed and freed blocks.
I don't have the source to hand since I am miles from my PC, but I
recall two constants which need to be #DEFINED or passed with -D
to turn all this on. Look at the source of malloc.c for more info ;
there's no need to understand how it all works to understand how
to use these debugging features.
Kevin Ashley
------------------------------------------------------------------------------
Kevin Ashley K DOT Ashley AT Ulcc DOT ac DOT uk
Systems Development Group Manager http://www.ulcc.ac.uk/staff/Kevin+Ashley
University of London Computer Centre. ...ukc!ncdlab!K.Ashley
This is not a signature
- Raw text -