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=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: newbie: can't read fast enough... :-) memory leaks... Date: Wed, 03 Sep 2014 16:19:57 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <479b2efe-0238-4b2a-8b05-cb1a0b4a57e5@googlegroups.com> <1409739464.7121.235.camel@obry.net> <1409765762.11813.2.camel@obry.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls7.std.com 1409775573 24696 192.74.137.71 (3 Sep 2014 20:19:33 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 3 Sep 2014 20:19:33 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:YuhlbgA0wXC1LrCPCvXJUdVy6lw= X-Received-Bytes: 2065 X-Received-Body-CRC: 1735661829 Xref: number.nntp.dca.giganews.com comp.lang.ada:188845 Date: 2014-09-03T16:19:57-04:00 List-Id: Pascal Obry writes: > Le mercredi 03 septembre 2014 à 13:28 -0400, Robert A Duff a écrit : >> I have successfully used the BDW conservative garbage collector with >> Ada. > > Is that with GNAT? Yes, it was. This was years ago, so I don't remember details. I think it was on Linux, but it might have been windows. > I've never looked at garbage collector. Is it possible with Ada to > create a pool using BDW garbage collector and make it the default pool? I didn't use storage pools. I think I hacked the GNAT runtimes a little bit. E.g. change System.Memory to use GC_malloc, which is Boehm's version of malloc. And I had to change how tasks are created to call Boehm's version of thread-create. > Would that work as expected? I don't think so, at least not in a simple way. GC can't work within a single pool -- it would need to trace pointers that point into the pool from outside it (from other pools, from the stack, registers, ...). - Bob