Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!purdue!bu-cs!bzs From: bzs@bu-cs.BU.EDU (Barry Shein) Newsgroups: comp.unix.wizards Subject: Re: libpw.a Message-ID: <29996@bu-cs.BU.EDU> Date: 22 Apr 89 17:49:41 GMT References: <157@dftsrv.gsfc.nasa.gov> <10013@smoke.BRL.MIL> <8184@chinet.chi.il.us> <1250@frog.UUCP> <564@aablue.UUCP> <1883@thor.acc.stolaf.edu> <15945@rpp386.Dallas.TX.US> Distribution: na Organization: Boston U. Comp. Sci. Lines: 30 >It IS a nice concept. It would be nice if C had better garbage >collection, like LISP. I always enjoyed SNOBOL and LISP programming >because you use the stuff, then toss it, then use it again. In C >and others, memory management is a CHORE. > >>To repeat: alloca is EVIL. > >It doesn't have to be. >-- >John F. Haugh II +-Quote of the Week:------------------- Some Pascals (maybe all?) supported a possible compromise where you called a routine "mark()", did your allocs and later some sort of super-free which would release everything back to the last mark() call. There was no need to call all in the same routine, just so long as mark() was called earlier than the allocs and free. It could work either stackwise (my preference) or take some sort of magic cookie to identify which mark to clear back to (probably useful before a longjmp after an error condition.) This should be very easy to implement within C/Unix, even within the current malloc schemes by just introducing a special mark cell into the chain. -- -Barry Shein, Software Tool & Die There's nothing more terrifying to hardware vendors than satisfied customers.