Malloc in Turbo C

Peter D. Smith pdsmith at bbn.com
Thu Mar 1 01:42:55 AEST 1990


In article <90058.153755CMH117 at psuvm.psu.edu> CMH117 at psuvm.psu.edu (Charles Hannum) writes:
>
>As a side note:  No insult intended against you, but this is a prime example
>of why we need to teach people a programming language before we expect them
>to use it.  The concept of pointers is so basic to the C language that it seems
>impossible that you've had any formal education in the language.  Is it that
>you've never had the opportunity, never had the time, or never had the need
>before?  And have you considered taking a class (assuming one is available)?
>

C'mon lay off the guy.  Malloc and Free are tough to get right.  A story:
at a previous job, we built a run time allocation checker (bounds checking,
freeing the same memory twice, freeing a pointer after incrementing it, not
freeing memory, allocation statistics... the whole ball of wax). **Every
single library** by **every single C engineer** had problems!

Most implementations of C are screwed up: they give you a dangerous tool
but don't give you a handle on double-checking the results.

				Peter D. Smith



More information about the Comp.lang.c mailing list