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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,18e0d6e2d3937639 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.193.129 with SMTP id ho1mr3056441pbc.8.1340363414433; Fri, 22 Jun 2012 04:10:14 -0700 (PDT) Path: l9ni6631pbj.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.musoftware.de!wum.musoftware.de!news.karotte.org!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 22 Jun 2012 13:10:12 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: begin/end reducing memory consumption? References: In-Reply-To: Message-ID: <4fe45295$0$9518$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 22 Jun 2012 13:10:13 CEST NNTP-Posting-Host: f297ccf1.newsspool1.arcor-online.net X-Trace: DXC=a]h:]C2XHOBAa;:RKVJ>LEic==]BZ:afN4Fo<]lROoRAnkgeX?EC@@@RXf;QenT\CMnc\616M64>JLh>_cHTX3jMd^J2XSe=cRC X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: 2012-06-22T13:10:13+02:00 List-Id: On 22.06.12 11:08, Anonymous wrote: > What I don't get is that if I comment out the above "begin/end" lines, > then memory usage increases with No_iterations and for No_iterations = 8 > reaches about 550 MB. Including begin/end reduces memory usage to 37MB (then independent of No_iterations, as it should be). This is mere speculation: The block statement makes some variables "more" local and the implementation of Vectors can perform some memory management. I'd try -O2 -funroll-loops [-gnatn], too, replacing -O3. (Some oddly related information (or maybe not having something to do with this at all) may be available if you have GCC -fdump-tree-slp-details. I have seen some decisions reported there to do with exceptions handling being obstacles; that was FSF GNAT, though, GNAT GPL seemed "better", and the issue might be gone with most recent FSF GNATs.)