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,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: newbie: can't read fast enough... :-) memory leaks... Date: Fri, 5 Sep 2014 04:58:03 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <479b2efe-0238-4b2a-8b05-cb1a0b4a57e5@googlegroups.com> <1409739464.7121.235.camel@obry.net> Reply-To: anon@att.net NNTP-Posting-Host: CkJNh7wMfEzeDdFwBmEFcg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: number.nntp.dca.giganews.com comp.lang.ada:188875 Date: 2014-09-05T04:58:03+00:00 List-Id: For GNAT, you can copy to your local dir and modify "System.Pool_Global" (GNAT) and "System.Pool_Local" (GNAT) compile and link them you to your program. The "Deallocation" routine is normally unfunctional so memory is "reclaimed" during program finalization only. So the "Deallocate" routine that needs to be modified for GC collection. But leaks may still appear from using outside non-Ada libraries or making some OS calls. It one reason why "binding" to these libraries or routines should be limited to testing phase only and then rewritten in Ada if possible. In , Robert A Duff writes: >Brad Moore writes: > >> I wonder how many implementations are out there that do not have a >> default storage pool that reclaims the storage of a collection of an >> nested access type when the master associated with of the access type >> declaration is exited. > >I know of only one compiler that frees local collections automatically >-- Rational/IBM/Atego. Unless you use a Storage_Size or Storage_Pool >clause, which works in all compilers, AFAIK. > >> I'm pretty sure that GNAT does for Windows and Linux, but perhaps they >> have a minimalist runtime for certain targets where this is not needed >> or desired? > >No, GNAT doesn't do it. I don't think it should be automatic: if you >want that functionality, use a storage pool. > >- Bob