comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry <lanceboyle@qwest.net>
Subject: Re: Help needed - Upper Bound of an array - Question.
Date: Tue, 7 Feb 2012 14:08:08 -0800 (PST)
Date: 2012-02-07T14:08:08-08:00	[thread overview]
Message-ID: <68a82c06-7767-476b-b74f-bdb51796c6f2@n12g2000yqb.googlegroups.com> (raw)
In-Reply-To: 9203a648-af0d-45a1-87ba-67373435b391@k10g2000yqk.googlegroups.com

On Feb 7, 7:41 am, adacrypt <austin.oby...@hotmail.com> wrote:
> I am not an expert programmer in Ada but I have taught myself enough
> Ada-95 to be able to write some difficult cryptography programs that I
> post in another group.
>
> My problem is this.  I need to test the frequency of the ciphertext
> which is sometimes a long string of large positive integers of 7 or 8
> digits in magnitude and to do that I need an array that will
> accommodate up to 10,000,000 elements ideally.
>
> I have already found out that I cannot go more than 500,000 elements
> in the array size.  My computer has 32-bit architecture.
>
> What I need to know from some kind person is this - Is the array size
> a property of the Ada-95 language or the computer?
>
> I need to know this before resorting to a 64-bit computer which might
> not solve the problem and be an expensive mistake.
>
> Your help would be greatly appreciated.
>
> - adacrypt

This question arises from time to time; see these two previous
threads:

http://groups.google.com/group/comp.lang.ada/browse_thread/thread/ae395e5c11de7bc9/bda8d61bd3a66ee9?hl=en&q=Jerry+stack&lnk=nl&

http://groups.google.com/group/comp.lang.ada/browse_thread/thread/419864ed91cc937d?hl=en#

(Sorry if I'm repeating anything earlier in this thread.)

Your best option is to use dynamic allocation which uses the heap,
then use "rename" to simplify your code.

Some (lesser) problems can be solved by increasing the stack size. I
don't know if this is possible from within the Ada code using pragmas,
but you can do it from the shell (before running your program) using
ulimit, or from within the Ada code by importing the C functions
setrlimit and getrlimit.

Jerry



      parent reply	other threads:[~2012-02-07 22:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 14:41 Help needed - Upper Bound of an array - Question adacrypt
2012-02-07 15:00 ` Yannick Duchêne (Hibou57)
2012-02-07 15:04 ` Mark Lorenzen
2012-02-07 15:08 ` Ludovic Brenta
2012-02-07 15:27   ` Yannick Duchêne (Hibou57)
2012-02-07 15:59   ` adacrypt
2012-02-07 16:13     ` Gautier write-only
2012-02-07 17:30     ` Jeffrey Carter
2012-02-07 19:51       ` tmoran
2012-02-09  3:31         ` Randy Brukardt
2012-02-07 18:22     ` Ludovic Brenta
2012-02-07 20:42       ` adacrypt
2012-02-07 18:56     ` Georg Bauhaus
2012-02-07 21:22     ` Robert A Duff
2012-02-07 15:33 ` Álex R. Mosteo
2012-02-07 22:08 ` Jerry [this message]
replies disabled

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