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: bobduff@world.std.com (Robert A Duff) Subject: Re: Garbage Collection in Ada Date: 1996/10/15 Message-ID: #1/1 X-Deja-AN: 189583334 references: <01bbb910$f1e73f60$829d6482@joy.ericsson.se> <199610132138291604607@dialup101-6-14.swipnet.se> <19961014235451303023@dialup118-1-7.swipnet.se> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-10-15T00:00:00+00:00 List-Id: In article <19961014235451303023@dialup118-1-7.swipnet.se>, Lars Farm wrote: >I don't think of GC as a Silver Bullet, just a very useful tool. Agreed. >For Ada I was thinking of virtual origins and conservative collectors, >but I realise there are other algorithms. For C++ I think the only >reasonable alternative is a conservative collector and figured the same >was true for Ada. Not at all -- a non-conservative GC is quite compatible with Ada. Of course, a non-conservative GC (in any language) requires a well-defined interface between the compiler's generated code, and the GC. >... OTOH I also disclaimed any expertise of Ada so perhaps >my error can be forgiven? Of course. :-) >No, I didn't claim that Boehms collector worked in Ada. I said it works >nicely in C++ and it does! The Boehm GC is written for for C and C++ >where such techniques are forbidden. A pointer can be NULL, can point at >or into an object or at the imaginary element directly after the last >element of an array.... Ah, but nothing requires the compiler to represent a pointer to one of those legal places as the address of that place. A C or C++ compiler could play games similar to the virtual origin trick, and then the Boehm GC might not work. In other words, the Boehm GC, or any other conservative GC, depends on the lack of certain optimizations, which makes me a bit uneasy. In practise, maybe it's not such a big problem. - Bob