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,8749545ac52d7b9c X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Great Circle and Ada? Date: 1996/09/18 Message-ID: #1/1 X-Deja-AN: 181260310 references: <51mj21$jif@watnews1.watson.ibm.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-09-18T00:00:00+00:00 List-Id: In article <51mj21$jif@watnews1.watson.ibm.com>, Norman H. Cohen wrote: >However, a CONSERVATIVE garbage collector makes guesses about which words >are pointers precisely because it has no information about how the >compiler has laid out storage. The only knowledge exploited by a >conservative garbage collector is knowledge of the data structure >(typically boundary tags) used by the run-time system's allocator. I wouldn't say that's the *only* knowledge. The conservative GC also knows (or hopes!) that the compiler represents access types or pointers or whatever language feature it is using machine addresses. And that these machine addresses always point at the data, or perhaps in the middle of the data. There are *lots* of tricks compilers can play that will break a conservative garbage collector. Virtual origins is one. Playing games with pointer representation is another. E.g. packing a small integer field and a pointer into one 32-bit word. (A pointer doesn't always need all 32 bits -- the low bits are always zero, because the thing is known to be aligned, and the high bits are known, because the compiler knows where the heap and other data is in the address space). How about the Lisp-ish tricks for representing fixnums vs. bignums? Compiler writers blame it on the conservative gc, and gc writers blame it on the compiler. ;-) Either way, there has to be *some* known information about the interface between the two, or gc won't work. - Bob