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,7343d4a788a9b1a5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!g10g2000cwb.googlegroups.com!not-for-mail From: "Martin Krischik" Newsgroups: comp.lang.ada Subject: Re: How-to on using the adacl-gc packages Date: 15 May 2006 05:16:09 -0700 Organization: http://groups.google.com Message-ID: <1147695369.230446.187070@g10g2000cwb.googlegroups.com> References: <820e1$44676a08$52ae05e3$31697@news.versatel.net> NNTP-Posting-Host: 138.189.120.37 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1147695375 28357 127.0.0.1 (15 May 2006 12:16:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 15 May 2006 12:16:15 +0000 (UTC) In-Reply-To: <820e1$44676a08$52ae05e3$31697@news.versatel.net> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g10g2000cwb.googlegroups.com; posting-host=138.189.120.37; posting-account=2-0LkQwAAAAQMhPSoYwlMiUmi-6lYh44 Xref: g2news2.google.com comp.lang.ada:4263 Date: 2006-05-15T05:16:09-07:00 List-Id: Erik J Pessers wrote: > Dear all, > > I tried to play around with the Martin Krischik garbage > collection routines in the AdaCL packages, but the doc > supplied with the package is very terse indeed (at least > for some-one with my limited background in garbage > collection and pool management matters). > > Any-one around that would be willing to share some > actual snippets of code using the AdaCL.GC.Managed > and AdaCL.GC.Managed_Controlled packages, that could > be a clue for me on how things fit in? Well there are examples in AdaCL itself: just look for 'Storage_Pool. There indeed not much which you need to do apart from choosing the right storrage pool. Inside the Subversion archive, in branch Ada_2005 you also find some new stress tests for the collector. Start at http://svn.sourceforge.net/viewcvs.cgi/adacl/branches/Ada_2005/adacl/Source/testgc.ads?view=markup > Also: any general feelings on whether including > garbage collection is something to really worry > about in practice? Honest answer: since I found out about the power 'Class and generic type T (<>) is private I don't think it is worth that much. Also: the stress tests reveiled a weeknees inside the collector library: Sometimes GNAT internaly caches pointers to objects. The collector correctly find the reference and won't release the object. Read: http://en.wikipedia.org/wiki/Weak_reference Especialy controled objects are hit. Martin