libpw.a

Barry Shein bzs at bu-cs.BU.EDU
Sun Apr 23 03:49:41 AEST 1989


>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.



More information about the Comp.unix.wizards mailing list