Mail Archives: djgpp/2000/10/12/16:19:19
> From: "Chaos" <chengin AT alpha DOT net DOT pl>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 12 Oct 2000 20:46:54 +0200
> >
> >You probably have a buffer overflow somewhere, writing garbage over
> >the data structure that malloc()/free() uses to keep track of the
> >heap. For more information, look in DJGPP FAQ entry 9.2. YAMD, yet
> >another malloc() debugger by Nate Eldredge, may help:
> > http://www3.hmc.edu/~neldredge/yamd/
>
> Strange. All free()'s are at the very end of program.
It doesn't matter. If the code elsewhere in your program has
overwritten some of the allocated buffers, any call to free() can
crash, because malloc and free maintain information about memory
allocations right before the beginning and after the end of the buffer
that you get from malloc.
- Raw text -