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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,29850945228df59 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-23 07:37:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Boehm-Demers-Weiser conservative garbage collector and GNAT Date: Sun, 22 Jun 2003 19:32:29 +0200 Organization: AdaCL Message-ID: <1553495.v99NdxNB06@linux1.krischik.com> References: <1316747.mXveBPtf0Z@linux1.krischik.com> <87brwrs1qe.fsf@deneb.enyo.de> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1056378963 03 11402 XFcLVvyTS1AXge 030623 14:36:03 X-Complaints-To: usenet-abuse@t-online.de X-ID: ZZGfG8ZCge3OglxyeWu4q0Z2MQHTNzBSC-ohB2bvw-gA1J8UnV186e User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:39603 Date: 2003-06-22T19:32:29+02:00 List-Id: Florian Weimer wrote: > Martin Krischik writes: > >> I am wondering if it is possible to implement a storage pool using >> the Boehm-Demers-Weiser conservative garbage collector in GNAT. > > There are a few pitfalls. For example, objects with a controlled > component are always reachable from the collector's point of view, so > they can never be collected (in fact, the Ada semantics of > finalization mandate this behavior). Furthermore, the collector can > hugely benefit from very basic type information (proper flagging of > pointer-free objects and objects without aliased components). The Boehm-Demers-Weiser conservative garbage collector has atomic memory which must be pointer free. But this is used only for performance improvemend. > However, the real killer for the storage pool approach is the fact > that the collector will neither track properly the root set, nor task > creation. You can solve the first problem with a custom > implementation of System.Memory (allocating all objects using the > collector); some more run-time library tweaking can solve the second. Current status is that I implemented the thin and thick bindung to the collector and added the collector to my Trace class. Trace is used in any class and task so it a good test. But I will add further tests. > (However, I still don't know if Boehm-Demers-Weiser collector is > actually compatible with GNAT's tasking implementation.) All seem to work with OS/2. I havn't had time for testing Linux. The mingw used with GNAT 3.15 Windows does not support all the signaling needed so I can't link libgc.a into the test programs. Any help is still be appreciated. With Regards Martin. -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com