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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d978d3056ed727b9 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Language Challenge 2000 - Update Date: 2000/02/07 Message-ID: #1/1 X-Deja-AN: 582804618 References: <38991E72.293907A4@sdynamix.com> <38992ADB.AC8748A8@mail.utexas.edu> <87bbro$9281@news.cis.okstate.edu> <87cg3u$8a21@news.cis.okstate.edu> <87d196$8q61@news.cis.okstate.edu> <87f3oe$92a1@news.cis.okstate.edu> <87fo89$aqm1@news.cis.okstate.edu> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 949955547 204 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-02-07T00:00:00+00:00 List-Id: On 4 Feb 2000, David Starner wrote: > On Fri, 4 Feb 2000 15:35:02 -0800, Brian Rogoff wrote: > >On 4 Feb 2000, David Starner wrote: > > > >> On Fri, 4 Feb 2000 07:53:54 -0800, Brian Rogoff wrote: > >> >What is the opposite/dual of a "conservative" garbage collector? > >> One that collects stuff that's in use? (-: > > > >The opposite/dual of a "conservative" garbage collector is a "precise" or > >"accurate" garbage collector. > > Yes, I knew that. Hence the smiley. Sorry. Actually, I should apologize; I gathered you knew when I read the rest of your message, but somehow my fingers were too quick on the draw. Sorry I sounded snotty. > >A conservative garbage collector (and really > >garbage collector should be in quotes) is not guaranteed to collect all > >garbage. Does that help a little? > > Sure, but a generational GC won't collect all the garbage each time > it does garbage collection, either. And most GC's will overlook a > technically live pointer that won't get used again. True, but I put that in a different category (missing on a sweep versus just permanently missing) than conservative GC. Besides, there are lots of precise GC variants besides generational GC. One thing I'd like in a language would be a more sophisticated interface to memory pools than what we have in storage pools right now. This has been discussed before, and probably the cabal behind Ada 0X is considering this. > Anyway, how would you implement a "precise" garbage collector in > pure Ada? You could restrict yourself to a subset of Ada. Do the Ada ==> JVM compilers allow you to munge addresses using the functionality in the System hierarchy? > The only way I can see working is by manually adding roots, > like GCC (2.96)'s internal GC does. But that's a pain that's also > mistake-prone. I probably don't understand storage pools well enough > for this, though. For full blown Ada, a reasonable substitute for GC sometimes is manual region management, where by "region" I mean something like a mark release pool a-la the Rationale. Its not quite as nice as GC but its usually better than trying to free individual objects. -- Brian