comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: large arrays
Date: Wed, 10 Nov 2004 18:07:14 -0600
Date: 2004-11-10T18:07:14-06:00	[thread overview]
Message-ID: <8YydnRLh6b1OMQ_cRVn-uw@megapath.net> (raw)
In-Reply-To: kNckd.488755$mD.84928@attbi_s02


"Jeff C r e e.m" <jcreem@yahoo.com> wrote in message
news:kNckd.488755$mD.84928@attbi_s02...
> From the GNAT RM (6.2)
>
>  The largest Size value permitted in GNAT is 2**31-1. Since this is a Size
> in bits, this corresponds to an object of size 256 megabytes (minus one).
> This limitation is true on all targets. The reason for this limitation is
> that it improves the quality of the code in many cases if it is known that
a
> Size value can be accommodated in an object of type Integer.

For what it's worth (probably nothing :-), Janus/Ada doesn't limit objects
on 32-bit architectures. We manage everything in terms of bytes, and only
calculate 'Size if someone asks for it (which might raise Constraint_Error
for really large objects).

But I have to sympathize with GNAT; the allocate-in-bytes designs needs a
lot of hacks to make it work for all of the sorts of representation items,
and I certainly can see why someone wouldn't want to do that.

Someone also complained that this limitation exists on all targets; I'm sure
that's because the compiler front-end uses 32-bit values for 'Size on all
targets. Otherwise, you'd have to have a 64-bit compiler before you could
compile the 64-bit compiler (we faced this same issue on the 36-bit Unisys
system).

                     Randy.






      parent reply	other threads:[~2004-11-11  0:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-09 19:49 large arrays Joel Lepinoux
2004-11-09 23:55 ` Jeff C r e e.m
2004-11-10  3:45   ` Dr. Adrian Wrigley
2004-11-10  3:57     ` Brian May
2004-11-10 12:47     ` Jeff C r e e.m
2004-11-10  5:03   ` Steve
2004-11-10 12:41     ` Jeff C r e e.m
2004-11-11  0:07   ` Randy Brukardt [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