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: free()
Message-ID: <2843@phoenix.Princeton.EDU>
Date: 10 May 88 09:46:42 GMT
Organization: Princeton University, NJ
Lines: 17
Keywords: free malloc alloc

When you free something you've malloc'ed, how does the compiler
keep track of how large a block you're freeing up?

Obviously, free() and malloc() are machine dependent. So specifically,
I'm working in Turbo C on an AT. Is it the compiler's job to keep
tabs on each block that gets allocated by malloc()? What if you just
freed a random block that wasn't allocated? (Big trouble, but why?)

If someone could explain what free() actually does, that would
help a great deal.

Thank a lot.
-- 
"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.