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,3498dd887729ed19 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Garbage Collection in Ada Date: 1996/10/20 Message-ID: #1/1 X-Deja-AN: 190735198 references: <01bbb910$f1e73f60$829d6482@joy.ericsson.se> <199610132138291604607@dialup101-6-14.swipnet.se> <19961014235451303023@dialup118-1-7.swipnet.se> <19961016113936528855@dialup120-4-1.swipnet.se> <199610191920401982154@dialup119-3-12.swipnet.se> organization: New York University newsgroups: comp.lang.ada Date: 1996-10-20T00:00:00+00:00 List-Id: Lars replies to me " > it is interesting to note that the mixture of > two such fiddles can sometimes go astray (as is the case with conservative > GC, and manual virtual origin mucking) If you were someone other than Prof. Dewar I'd be tempted to say: "No, you are confused " ;-) User code is not the same thing as the runtime system provided by the implementation. The GC should be provided by the impementation." I reply to the reply: But this is, so far, a fantasy. The only kind of GC provided by standard implementations, at least in my experience, is proper accurate GC, that is of course embedded into the compiler or operating system or both. You can certainly imagine a system that provides conservative garbage collection as a standard part of a compiler, or even just a standard system library. But I don't know of any such commercial products, do you? So in practice, a conservative garbage collector is just a bit of application code which you get from somewhere and include in your application. It also happens to be application code that is fiddling with C semantics. Hence my comment definitely does apply! Actually, as I have noted before, I am dubious about real applications depending on conservative GC, so I can't see it being an integral part of a language implementation. For example, I can see putting a conservative collector interface into some user library for GNAT, but not into the main language library. Actually I think that Geert is indeed working on interfacing the HJB CGC to GNAT (that's why he complained about the possibility of us moving to use virtual origins, something we definitely intend to do at some point, so presumably this conservative GC would stop working if we did that, unless it got more clever (more clever is possible here, but difficult, i.e. the scan of memory could recognize in addition to simple direct pointers, possible instances of virtual origin descriptors, they have a perfetly well defined format.