Recoding Lisp programs in C

richw at ada-uts.UUCP richw at ada-uts.UUCP
Tue Oct 8 02:58:00 AEST 1985


>> ***** ada-uts:net.lang.c / brl-tgr!gwyn /  9:39 pm  Oct  5, 1985
>> If the code needed to be done in LISP in the first place,
>> then any C translation is going to have to provide garbage
>> collection anyway.

What about having the C version be conscientious about using "malloc"
AND "free"?  Though many people I know feel that dynamic storage
allocation is a "detail" that programmers need never worry much about,
I wonder if making sure to "free" anything you "malloc" is all that
hard.

I wrote my own slightly modified versions of "malloc" and "free" which
remember how many allocated blocks haven't been freed, and then prints
out an error message at the end of the program (I also modified "exit"
to do this) if all allocated blocks haven't been freed.  Unfortunately,
I haven't had time to use these versions in recent work.

Has anyone out there REALLY used "free"?  I'm very curious about this...

>> Personally I think AI has been oversold.

I'd like to shake your hand.  I have my own opinions about AI that I
won't (and shouldn't) flame about, but KEEP THAT DISRESPECT FLOWING !!!

-- Rich



More information about the Comp.lang.c mailing list