🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5418

Re: Garbage Collection

#5418
From: 00704a-Liber
Date: Mon, 04 Apr 1988 23:14
28 lines
1985 bytes
[followups to comp.lang.misc]

In article <26358@cca.CCA.COM> g-rh@CCA.CCA.COM.UUCP (Richard Harter) writes:
>	There is problably something I am missing, but I don't quite see
>how you can implement garbage collection in C without collateral assumptions
>-- how is the garbage collector supposed to know that that a block is free?

The only way to do this is to allocate a giant heap with malloc()
and do *all* the memory management on your own.  It is no different
than implementing in C or C++ a language that does automatic garbage
collection.


The problem I found with languages that do automatic garbage collection is
that there is no way for me to modify the implementation of the class (or
the type, for those of you unfamiliar with C++ lingo :-)) to make it better
suit my needs.

For applications where the programmer cost is greater than the run-time
cost (such as prototypes, personal tools, one-shot programs), I tend to use
languages with built in memory management.  For other applications, however,
I would rather use a language like C++ which allows me to change the
implementation of a class without affecting the rest of my code.
-- 
 _ __			NEVIN J. LIBER	..!ihnp4!ihlpf!nevin1	(312) 510-6194
' )  )				"The secret compartment of my ring I fill
 /  / _ , __o  ____		 with an Underdog super-energy pill."
/  (_</_\/ <__/ / <_	These are solely MY opinions, not AT&T's, blah blah blah
Technical Details
Message-ID: <4265@ihlpf.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!uwvax!oddjob!gargoyle!att-ih!ihnp4!ihlpf!nevin1
References: <145@krafla.rhi.hi.is> <272@fang.ATT.COM> <429@zap.UUCP> <8196@sol.ARPA> <628@ra.rice.edu> <26358@cca.CCA.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!uwvax!oddjob!gargoyle!att-ih!ihnp4!ihlpf!nevin1
From: nevin1@ihlpf.ATT.COM (00704a-Liber)
Newsgroups: comp.lang.misc,comp.lang.modula2,comp.lang.ada
Subject: Re: Garbage Collection
Message-ID: <4265@ihlpf.ATT.COM>
Date: 4 Apr 88 23:14:21 GMT
References: <145@krafla.rhi.hi.is> <272@fang.ATT.COM> <429@zap.UUCP> <8196@sol.ARPA> <628@ra.rice.edu> <26358@cca.CCA.COM>
Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.)
Followup-To: comp.lang.misc
Organization: AT&T Bell Laboratories - Naperville, Illinois
Lines: 28