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,80bc3e0698be468f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!134.158.69.22.MISMATCH!in2p3.fr!kanaga.switch.ch!news-zh.switch.ch!switch.ch!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Type safety on wikipedia Date: Sat, 28 Jan 2006 07:52:06 +0100 Organization: Cablecom Newsserver Message-ID: <1984908.VtMkCDnA45@linux1.krischik.com> References: <1138260496.230283.147640@g43g2000cwa.googlegroups.com> <1138283608.433842.76060@z14g2000cwz.googlegroups.com> <43D8E85C.6020805@mailinator.com> <1535741.yb0A0MsH1D@linux1.krischik.com> <43D912A3.2030201@mailinator.com> <11271924.245PKaY7qe@linux1.krischik.com> NNTP-Posting-Host: 84-74-134-212.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1138432504 21152 84.74.134.212 (28 Jan 2006 07:15:04 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Sat, 28 Jan 2006 07:15:04 +0000 (UTC) User-Agent: KNode/0.10 Xref: g2news1.google.com comp.lang.ada:2694 Date: 2006-01-28T07:52:06+01:00 List-Id: Simon Wright wrote: > Martin Krischik writes: > >> Simon Wright wrote: >> >>> "Alex R. Mosteo" writes: >>> >>>> This is something I've mused about sometimes: Let's suppose some Ada >>>> compiler goes ahead and provides a GC. What happens with programs >>>> written without taking this into account? >>> >>> 13.11.2(17) only says that Free _should_ reclaim the storage. I >>> suppose for a GC implementation there could be at least 2 >>> implementation strategies: >>> >>> * don't actually reclaim, just remove local reference and deal with >>> tasks if necessary >>> >>> * check that the reference count is in fact 1 and raise *_Error if >>> not! That would be useful! >> >> That is indeed interesting. Up until now I have implemented the interface >> to the bohem-weiser collector as such that memory is reclaimed. Being >> German I did not spot the true meaning of should. I might reconsider the >> implementation. > > I was imagining that GC and Free might be independent, so that (modulo > tasks and finalization) Free would only have to null the pointer and > GC would magically see later that the memory was no longer > referenced. I think the collector you're working on s more > cooperative? The collector I work on (or better bind to) is also used in GCC Java and GCC Objective-C and supports finalization and unchecked deallocation. Current Roadmap: * stress tests the collector interface - especially task and finalization. * make the collector interface available via the GNU Ada project. Martinn -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com