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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,29850945228df59 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-21 11:51:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feed.news.nacamar.de!news.belwue.de!news.uni-stuttgart.de!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Boehm-Demers-Weiser conservative garbage collector and GNAT Date: Sat, 21 Jun 2003 20:51:37 +0200 Message-ID: <87brwrs1qe.fsf@deneb.enyo.de> References: <1316747.mXveBPtf0Z@linux1.krischik.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1056221497 3066 212.9.189.171 (21 Jun 2003 18:51:37 GMT) X-Complaints-To: Cancel-Lock: sha1:7WXyVt9y//dU0CM3PyoxvnBWPXc= Xref: archiver1.google.com comp.lang.ada:39530 Date: 2003-06-21T20:51:37+02:00 List-Id: 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). 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. (However, I still don't know if Boehm-Demers-Weiser collector is actually compatible with GNAT's tasking implementation.)