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/16 Message-ID: #1/1 X-Deja-AN: 189820244 references: <01bbb910$f1e73f60$829d6482@joy.ericsson.se> <199610132138291604607@dialup101-6-14.swipnet.se> <19961014115513529729@dialup105-2-16.swipnet.se> organization: New York University newsgroups: comp.lang.ada Date: 1996-10-16T00:00:00+00:00 List-Id: Lars says "I doubt that I will get proper sanction for GC in a language spec. Fortunately it is very easy to get GC in C++ if one is willing to sacrifice portability. All it takes is to link Boehms allocator and it works beautifully without any other changes." Well if your requirements here are so weak that you find that these kind of conservative GC's are acceptable, then what's your problem, the same approach will work in typical Ada compilers as well as it does in typical C compilers (probably better, because it is far harder to play games at the user level with pointers in Ada than in C or C++) If you have somehow got the impression that this is not the case, and that Ada is somehow hjarder to deal with in this repsect than C or C++, you have confused yourself or misinterpreted something that has been said. Personally, although these kind of conservative collectors are a partial solution useful in some circumstances, I don't find them acceptable for serious solution of the GC problem. If you count on a conservative collector to free storage, you have a very unreliable program, since you could find on some particular run that you were just unlucky and a junk integer value held a critical large block in memory, causing the program to crash and burn. If you don't mind a program with this kind of unreliability, then this approach may work, but for me, the only really viable approach, and the only one worth putting real effort into in the Ada context is a proper full GC that know what is a pointer and what is not. I don't like the confusion between these two techniqes, they are very different. n