comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: GNAT's stack checking in Ubuntu 9.04 (and Shootout regex-dna)
Date: Tue, 04 Aug 2009 12:44:15 +0200
Date: 2009-08-04T12:44:16+02:00	[thread overview]
Message-ID: <4a781100$0$30236$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <7d604363-8623-4146-8aa5-9a7ec729023b@j21g2000yqe.googlegroups.com>

Vadim Godunko schrieb:
> 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,

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.)



  reply	other threads:[~2009-08-04 10:44 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
2009-08-04 10:44         ` Georg Bauhaus [this message]
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