From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aa2e415128e40fff X-Google-Attributes: gid103376,public From: wtanksle@sdcc10.ucsd.edu (William Tanksley) Subject: Re: Question about garbage collection Date: 1998/04/21 Message-ID: <6hiv42$spu$1@news1.ucsd.edu>#1/1 X-Deja-AN: 346408214 References: <6hf8jj$p9a$1@mulga.cs.mu.OZ.AU> Organization: University of California, San Diego Newsgroups: comp.lang.ada Date: 1998-04-21T00:00:00+00:00 List-Id: In article dewar@merv.cs.nyu.edu (Robert Dewar) writes: ><"conservative" gc. I tend to agree -- it seems like a hack that's >required for languages like C, which are not designed to make gc easy. >And for compilers designed without gc in mind (whether or not the >language is). And it makes me uneasy that memory can't be compacted. >>> >I never said that! In fact I find the conservative GC approach a clever one, >but it is important not to confuse it with real GC, such as is found in a >typical Modula-3, Algol-68, SNOBOL4, LISP or Java system. >With true GC, you have an invariant that after a collection, an object is >not present if it is not referenced, and you can analyze worst case >storage requirements on this basis. Obviously no such analysis is possible >with conservative GC. I don't really care for this definition. It omits the possibility of generational or otherwise incremental GC. These are both very powerful and useful GC methods. >But as I said before, if the primary reason for GC is to improve performance >by reducing memory requirements, then conservative GC is a cheap way to >achieve this goal. In the same way that any heuristic algorithm can achieve its goal -- usually outperforming the exact algorithm by an amazing amount. Honestly, I think that talking about 'true' GC is strongly misleading. I could understand 'strong' GC and 'weak' GC, or 'exact' GC and 'heuristic' GC, but 'true' and 'false'? Whew. Shouldn't be used. Unless, of course, one is comparing reference counting to GC... :-) Even in a conservative GC, garbage will always _eventually_ be collected, and is never lost. In reference counting garbage can be lost. -Billy