comp.lang.ada
 help / color / mirror / Atom feed
From: Vadim Godunko <vgodunko@gmail.com>
Subject: Re: GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna)
Date: Tue, 4 Aug 2009 02:58:57 -0700 (PDT)
Date: 2009-08-04T02:58:57-07:00	[thread overview]
Message-ID: <7d604363-8623-4146-8aa5-9a7ec729023b@j21g2000yqe.googlegroups.com> (raw)
In-Reply-To: 4a77fcc3$0$30229$9b4e6d93@newsspool1.arcor-online.net

On Aug 4, 1:17 pm, Georg Bauhaus <rm.tsoh.plus-
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, you can setup unlimited size by

ulimit -s unlimited

> More guesswork: Is an empty Unbounded_String a heavy
> construct?  Observing the memory consumption of
> regexdna, for reading and matching the ~50 Mo input
> it does not consume more than about ~60 Mo, according
> to free(1) and top.  Then, the stack allocation of the lines
> array seems to hit some memory boundary. (625_000 default
> initialized Vstrings, which is a subtype of Unbounded_String.)
> valgrind (in default mode) did not find anything IIRC.

Unbounded_String uses constant size of stack for object itself and
uses dynamic size on heap for actual value. But note, concatenation
operations of strings and arrays can use stack for intermediate
result, thus can be the source of problem.



  reply	other threads:[~2009-08-04  9:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 22:54 GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna) Georg Bauhaus
2009-08-03 22:56 ` Georg Bauhaus
2009-08-04  7:50   ` Ludovic Brenta
2009-08-04  9:17     ` Georg Bauhaus
2009-08-04  9:58       ` Vadim Godunko [this message]
2009-08-04 10:44         ` Georg Bauhaus
2009-08-04 12:30           ` Vadim Godunko
2009-08-04 14:15             ` Georg Bauhaus
2009-08-04 22:20         ` Egil
2009-08-04 15:38       ` Robert A Duff
2009-08-04 11:59 ` Brian Drummond
2009-08-04 14:18   ` Georg Bauhaus
2009-08-09 19:13   ` Georg Bauhaus
2009-08-10 13:10     ` jonathan
2009-08-10 20:12     ` jonathan
2009-08-10 20:29       ` Ludovic Brenta
2009-08-10 23:34       ` Georg Bauhaus
2009-08-11 20:02         ` jonathan
2009-08-11 21:19           ` jonathan
2009-08-11 21:38           ` Georg Bauhaus
2009-08-11  0:27       ` Georg Bauhaus
2009-08-11 19:05         ` jonathan
2009-08-12  9:32           ` Ludovic Brenta
2009-08-12 16:37             ` jonathan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox