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,419864ed91cc937d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: heap size exceeded for large matrices Date: Mon, 30 Aug 2010 13:00:40 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <14007b1b-c290-4c73-a0ec-d3c5195b83d4@t20g2000yqa.googlegroups.com> <4c7a360b$0$10227$ba4acef3@reader.news.orange.fr> <340c87af-1f15-4590-baa9-ec7e864b7048@l20g2000yqm.googlegroups.com> <4c7ada3c$0$2372$4d3efbfe@news.sover.net> <1xwfrisok7o8o.171bx0cou8174$.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1283187622 8457 192.74.137.71 (30 Aug 2010 17:00:22 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 30 Aug 2010 17:00:22 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:gT2cgkRxZVfHv7f0MUeMFIIuYlk= Xref: g2news1.google.com comp.lang.ada:13860 Date: 2010-08-30T13:00:40-04:00 List-Id: Simon Wright writes: > "Dmitry A. Kazakov" writes: > >> Now if you either declare an access type in a scope or else use an >> anonymous type then any object allocated by new and assigned to this >> pointer will be automatically destroyed when the scope is left: >> >> declare >> type Pointer is access all Object; >> X1 : Pointer := new Object; >> X2 : access Object := new Object; >> begin >> ... -- Using X1 and X2 >> end; -- Targets of X1 and X2 are finalized and freed here > > I'm pretty sure that GNAT does this by using the Reclaim pool mentioned > above to implement the storage pool. I don't think so. I think those objects are finalized, but never freed. And I think that's desirable behavior, because things like "Reclaim pool" have a cost, so should be enabled only upon explicit request. - Bob