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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e2c96fb2074cb1fa X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: Use of Unchecked_Deallocation and pragma Controlled Date: Fri, 26 Nov 2004 13:11:23 -0000 Message-ID: <30oobrF32elp6U1@uni-berlin.de> References: X-Trace: news.uni-berlin.de ByRE7DXpYXa0p5wgtNLbEg1iOtF9nV/tJDxM7QM7/syJwr+C8= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Xref: g2news1.google.com comp.lang.ada:6509 Date: 2004-11-26T13:11:23+00:00 List-Id: "Simon Wright" wrote in message news:x7v3byyzbqb.fsf@smaug.pushface.org... > I don't believe there are any Ada compilers (other than those targeted > to a JVM) that do garbage collection. I gather this is true. I intend to make ECLAT support full GC, but (as is often pointed out) it may be a while before ECLAT comes to life. > But even if there were, it seems to me it would be a pretty crappy > implementation that didn't notice you doing the Free and remember > somehow not to collect the garbage. I rather suspect it wouldn't pass > ACATS either. I wouldn't buy it. I think this is also true. AARM95A 7.6 (4a): Ramification: As explained in 3.10.2, the set of objects with the same accessibility level as that of the master includes objects declared immediately within the master, objects declared in nested packages, objects created by allocators (if the ultimate ancestor access type is declared in one of those places) and subcomponents of all of these things. If an object was already finalized by Unchecked_Deallocation, then it is not finalized again when the master is left. > On the other hand, the AARM > goes into > a lot of detail about it, so perhaps I'm just confused .. thank > heavens the compiler I'm using doesn't do it! One less thing to worry > about. Well, I believe an implementation that provides GC (by default) should provide a mechanism (e.g. a pragma) to turn it off. I guess this is impossible for a JVM targetted compiler (but that's one of my objections to Java and the JVM). But I'd also point out that built-in full GC will give you one less thing to worry about if your program: executes (or might execute) for extended periods of time; performs (or might perform) dynamic allocation of objects that will, in time, become unreachable (unused); must be reliable, especially in not running out of memory unnecessarily. I suggest that a few Ada programs, in practice, will be like this (consider AWS, for example). -- Nick Roberts