Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!udel!princeton!phoenix!mjschmel
From: mjschmel@phoenix.Princeton.EDU (Michael J. Schmelzer)
Newsgroups: comp.lang.c
Subject: Re: free()
Message-ID: <2846@phoenix.Princeton.EDU>
Date: 10 May 88 18:03:53 GMT
References: <2843@phoenix.Princeton.EDU> <27780@cca.CCA.COM>
Reply-To: mjschmel@phoenix.Princeton.EDU (Michael J. Schmelzer)
Organization: Princeton University, NJ
Lines: 27
Keywords: free malloc alloc

In article <27780@cca.CCA.COM> g-rh@CCA.CCA.COM.UUCP (Richard Harter) writes:

>	Er, I hope that 'compiler' was a slip.  In case it wasn't, the
It was. Forgive my lack of precision. I meant 'library' or something.

>	Free and malloc are implementation dependent -- they are 
>independent library routines.  The quality of implementations vary.
>There are a lot of rather cheesy implementations out there. 
So I shouldn't make any assumptions, in other words. 
That's exactly what I wanted to know. I mean, nobody actually
uses K&R's source code for their implementation, do they?

>allocators keep track of every block allocated and check whether an
>address passed to it via free is actually an allocated block.  In a
>lot of implementations the control information for the block is placed
>just before the block
So in other words, my free() routine has a lot more info than just
an address, right?

Thanks again, everyone!
My adviser calls me a "C wizard," let's just not tell him the truth,
OK?
-- 
"Sum Iuppiter Optimus Maximus!!"- My Latin teacher who flipped. 
"Worthlessness is the root of all worthlessness." -WPRB music dept.
Mike Schmelzer mjschmel@phoenix!princeton.edu
DISLAIMER:If you think I speak for anyone but myself, you must be a lawyer.