From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: Error: "could not understand bounds information on packed array"
Date: Fri, 29 May 2009 09:02:30 -0400
Date: 2009-05-29T09:02:30-04:00 [thread overview]
Message-ID: <nospam-817E18.09023029052009@news.aioe.org> (raw)
In-Reply-To: gvoim5$umb$1@aioe.org
In article <gvoim5$umb$1@aioe.org>,
Dennis Hoppe <dennis.hoppe@hoppinet.de> wrote:
> Now, I am sure it is "just" a recursion issue. The following test
> terminates after just 87.354 iterations:
[...]
> Output:
>
> 87354
I get 85287 with a stack size of 8192 KiB, ~100 bytes/frame.
[...]
> For me, 87.354 seems to be a very low upper bound of recursion. An
> adapted version in Java runs 519.045 recursion steps before a
> StackOverflowError occurs on the same machine.
Each JVM will surely have some default stack size. Mine gives 208369
for for the smallest permitted heap: -Xms1048576 -Xmx1048576. I would
not be surprised if the JVM stack frame is smaller.
> It is clear, that I cannot indefinitely call a procedure recursively.
> Unfortunately, I cannot predict in advance, how many recursion steps
> my program have to proceed. How can I avoid the stack overflow in
> recursion? Can I influence the upper bound of recursive calls, i.e
> the size of the run-time stack?
This is OS dependent. If you are using GNAT, you might check the User's
Guide:
<http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gnat_ugn_unw/Stack-Overflow-Checking.html>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
next prev parent reply other threads:[~2009-05-29 13:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 0:55 Error: "could not understand bounds information on packed array" Dennis Hoppe
2009-05-29 1:13 ` Dennis Hoppe
2009-05-29 11:58 ` Dennis Hoppe
2009-05-29 11:56 ` Per Sandberg
2009-05-29 13:02 ` John B. Matthews [this message]
2009-05-29 13:46 ` Dennis Hoppe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox