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: a07f3367d7,da39df064d0b18d7 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!newsfeed-hp3.netcologne.de!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 04 Aug 2009 12:44:15 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna) References: <4a776a94$0$31878$9b4e6d93@newsspool3.arcor-online.net> <4a776b25$0$31878$9b4e6d93@newsspool3.arcor-online.net> <47559b1f-cb97-455b-b76d-98a4f8a834ac@f37g2000yqn.googlegroups.com> <4a77fcc3$0$30229$9b4e6d93@newsspool1.arcor-online.net> <7d604363-8623-4146-8aa5-9a7ec729023b@j21g2000yqe.googlegroups.com> In-Reply-To: <7d604363-8623-4146-8aa5-9a7ec729023b@j21g2000yqe.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a781100$0$30236$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 04 Aug 2009 12:44:16 CEST NNTP-Posting-Host: 0bcd5a24.newsspool1.arcor-online.net X-Trace: DXC=`Eb95Rk6Lk8;]cDoEWD6A4ic==]BZ:af>4Fo<]lROoR1^YC2XCjHcb9hDM9OmT[e><;9OJDO8_SK6NSZ1n^B98i:PVX Vadim Godunko schrieb: > On Aug 4, 1:17 pm, Georg Bauhaus bug.bauh...@maps.futureapps.de> wrote: >> 8192 is the default output of ulimit -s on Ubuntu. >> >> I had set ulimit -s $((8192 * 64)) on both Ubuntu 9.04 >> and Debian 5 and both exhibit the same symptoms. Why? >> > This size is too small, What's the reason? > you can setup unlimited size by > > ulimit -s unlimited The machine happens to have 500 Mo of RAM; I had thought that would be sufficient for 2-3 times 50 Mo of input when processing is assumed to be mostly linear (at worst doubling each string). The program does fine in ulimit -s 8192 when the Dna_Lines array is allocated on the heap, so the overall amount of memory is not the problem. It hits the limit exaclty when the array of 625_000 default initialized Vstrings is allocated on the stack. No operations performed at that point. > Unbounded_String uses constant size of stack for object itself and > uses dynamic size on heap for actual value. Yes. How much does a default initialized Unbounded_String use when it is an array component? (I'll debug this when there is more time; just in case you happen to know, would be most helpful.) > But note, concatenation > operations of strings and arrays can use stack for intermediate > result, thus can be the source of problem. This was one of the fixes for the K-Nucleotide test. (Do the lower -> upper character mapping in A.S.Unbounded, then call To_String; not: call To_String and feed that to To_Upper.)