From: Dr Adrian Wrigley <amtw@linuxchip.demon.co.uk>
Subject: Problem taking 'Size of large array (gnat)
Date: 2000/09/13
Date: 2000-09-13T00:00:00+00:00 [thread overview]
Message-ID: <39C00504.65A7A9C@linuxchip.demon.co.uk> (raw)
I have encountered a problem running code for handling large records and arrays.
Although the ARM says the 'Size attribute is a universal integer, I
cannot use the attribute when the expected value would exceed 31 bits.
This becomes a problem when the size of the object exceeds 256MB.
I was trying to memory map (mmap) a file containing a large record.
I am using gnat 3.12p on x86/Linux
Questions:
1) Does this problem exist on the other popular Ada implementations on x86?
2) How can I compute the size in bytes of objects > 256MB?
Example code is below...
--------------
with Text_IO; use Text_IO;
procedure ShowSize is
type Big is array (0 .. 70_000_000) of Float;
type Long is range 0 .. 2**63 - 1;
X : Long;
begin
X := Big'Size; -- Constraint error here!
Text_IO.Put_Line ("X got " & Long'Image (X));
end ShowSize;
---------------
--
Dr Adrian Wrigley, (currently in Vancouver, BC)
next reply other threads:[~2000-09-13 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-13 0:00 Dr Adrian Wrigley [this message]
2000-09-13 0:00 ` Problem taking 'Size of large array (gnat) Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox