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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b307bd75c8071241 X-Google-Attributes: gid103376,public From: "John G. Volan" Subject: Re: newbie Q: storage management Date: 1997/05/09 Message-ID: <33740D4A.5BE1@sprintmail.com>#1/1 X-Deja-AN: 240457021 References: <5k5hif$7r5@bcrkh13.bnr.ca> <336E15A4.167E@magellan.bgm.link.com> <33720AA5.2E59@sprintmail.com> Organization: Sprint Internet Passport Reply-To: johnvolan@sprintmail.com Newsgroups: comp.lang.ada Date: 1997-05-09T00:00:00+00:00 List-Id: Jon S Anthony wrote: > > In article <33720AA5.2E59@sprintmail.com> "John G. Volan" writes: > > > I'm very keen to see how true GC (not conservative GC) could be > > shoehorned into Ada95 (other than by compiling to the Java virtual > > machine). > > Well, if you have compiler support this really should not be that much > of an issue. Jon, does this mean that the stuff you're working on involves adding some compiler support for GC? (Like, getting access types to behave like Controlled types, so they can register themselves as roots?) I guess I should have asked the question directly: How exactly are you planning to achieve this GC support? (If the answer is "I'd like to keep my cards close to the vest right now until it's done and I get my money for it", well, that's cool, but just say so.) Barring compiler support, it's fairly obvious that one could implement "smart references" in Ada95 using a Controlled type wrapped around an access type. (Clearly, this is how reference-counting schemes have been implemented in Ada95 already.) The Initialize, Adjust, and Finalize for these "smart references" could make sure that every reference registered itself with the collector. I can see that this combined with Storage_Pools could provide a complete GC mechanism. But it would require programmer discipline: A programmer would have to make sure to always wrap every access value into one of these "smart references." Some potential for human error there. > Conservative collectors really live in a "hostile" world > where there is no compiler support and not much other information > either (no type information, for example). So from this should I infer that your GC support will exploit type information? Hmm, I figured meta-data would have to come into the picture sometime. > > It seems to me that, before you can collect the dead objects in a > > given pool, you have to be able to locate and identify every access > > value that currently points into that pool. > > Yup - you certainly do. So is this what your stuff is going tot do? ------------------------------------------------------------------------ Internet.Usenet.Put_Signature (Name => "John G. Volan", Home_Email => "johnvolan@sprintmail.com", Slogan => "Ada95: The World's *FIRST* International-Standard OOPL", Disclaimer => "These opinions were never defined, so using them " & "would be erroneous...or is that just nondeterministic now? :-) "); ------------------------------------------------------------------------