comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <martin@krischik.com>
Subject: Re: Ada.Streams.Stream_IO.Stream_Access
Date: Wed, 17 Nov 2004 10:31:38 +0100
Date: 2004-11-17T10:31:38+01:00	[thread overview]
Message-ID: <2503562.0ghuoHsfDK@linux1.krischik.com> (raw)
In-Reply-To: y%rmd.47190$5K2.33118@attbi_s03

tmoran@acm.org wrote:

>>> > Ok, now I try to read from the huge file....and bang I am getting a
>>> > Constraint error. Is this a case that I just can't use ADA Streams on
>>> > files bigger then 2*31 bytes??
>   Works fine for me.  I read a 7GB file in 449,000 16K chunks.  What size
> chunks are you using?
> 
>>Not ADA related, but as a side issue, I am new to 64 bit
>>representation.
>>I understand it is split into High/Low (high-order 32 bits and low
>>order 32 bits
>>representations of the value). At the moment for files 3Gb in size,
>>High
>>is always zero, however, what happens if both High and Low have value?

>   The value is High*2**32+Low

And need to be stored in

type File_Position is range -2**32 .. +2*32-1;
for File_Integer'Size use 64;

or prehaps:

type File_Position is mod 2**64;
for File_Integer'Size use 64;

With Regards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com



      reply	other threads:[~2004-11-17  9:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16  4:16 Ada.Streams.Stream_IO.Stream_Access Alex
2004-11-16  8:06 ` Ada.Streams.Stream_IO.Stream_Access Marius Amado Alves
2004-11-16  8:28 ` Ada.Streams.Stream_IO.Stream_Access Martin Krischik
2004-11-16 18:19   ` Ada.Streams.Stream_IO.Stream_Access Alex
2004-11-16 18:52     ` Ada.Streams.Stream_IO.Stream_Access tmoran
2004-11-17  9:31       ` Martin Krischik [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