Turbo C 2.0 MaLfUnCtIoNiNg?

Mike Percy grimlok at hubcap.clemson.edu
Sat Jul 21 00:18:14 AEST 1990


mad-2 at kub.nl (C. Wekx) writes:


>Yo folks,
>	does anyone happen to know why Turbo C 2.0's malloc
>function is malfunctioning? They do not always signal an out of memory
>situation, but overwrite the first part of their segment instead.
 
Yo,
 
Sounds like you've written memory via a NULL pointer.  If you do a
malloc() and malloc returns NULL, there was no memory.  Sound like you
did a malloc(), got a return of NULL, didn't bother to check it, and
wrote through the NULL Pointer -- DS:0000 -- blasting across the low end
of the segment.  

"How much char could a char star star if char star could star char?"
Mike Percy                    grimlok at hubcap.clemson.edu
ISD, Clemson University       mspercy at clemson.BITNET
(803)656-3780                 mspercy at clemson.clemson.edu



More information about the Comp.lang.c mailing list