Re: Size of files
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 26, 2005
- 469 views
Vincent wrote: > > Juergen Luethje wrote: > > > > Hi all, > > > > how big are the biggest files that Euphoria can handle (especially > > interesting for me: on Windows)? > > > > I stumbled across the following text in the Eu 2.5 documentation of > > where(): "i = where(fn)". > > In the Euphoria documentation, 'i' means an integer, doesn't it? > > Since where() is zero based(*), this would mean that it works with > > files up to > > MAX_INTEGER+1 bytes = power(2,30) bytes = 1 GB > > > > Does where() actually not work with files > 1 GB? > > > > Regards, > > Juergen > > > > (*) This is not mentioned in the documentation of where(), BTW. > > > > -- > > Have you read a good program lately? > > > > > That was a bug fix in Euphoria 2.4 Alpha: > > bug fixed: where() was not always reporting file positions greater than 1 Gb > correctly. Arithmetic performed on the position would probably fail. It now > handles up to 2 Gb. > > > You can use integer atoms up to 32 bits long, but the limit of 2 GB is based > on the open() routine who's OP uses an obsolete C file routine, I think. Thus > 2 GB is the limit for Euphoria applications, libraries, opening files, file > inclusion, EDB files, etc. > > Rob should use newer C file I/O routines in the C backend that offer the full > 4 GB limit/8 byte offsets or something. Rob should also be thinking about 64 > bit compliant products sooner rather than later. > > 4 GB these days is not very much let alone 2 GB, especially for databases. That's correct. Thanks. I should add that the manual uses "i" to indicate 31-bit Euphoria integers, but seek() and where() can handle a number bigger than an integer (1Gb). I just re-tested it on some huge files. I will update the docs to use "a", to show that a number greater than 1Gb can be used. Actually, the limit on all platforms is 2 Gb, due to restrictions in the standard C library routines. You'd think the limit would be 4Gb, but it's not. I intend to go well beyond 2Gb or 4Gb, sooner or later, but it might not be possible for DOS. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com