Ranges longer than size_t.max

Jonathan M Davis jmdavisProg at gmx.com
Sun Dec 30 14:08:07 PST 2012


On Sunday, December 30, 2012 19:23:13 SomeDude wrote:
> On Saturday, 29 December 2012 at 06:12:52 UTC, Mehrdad wrote:
> > Uhm, 64-bit?
> > 
> > What about large files (> 4 GiB) on 32-bit systems?
> > 
> > (Say, if a range wants to provide random access to the bytes of
> > an 8 GiB file?)
> > 
> > And what about large bit vectors? A 600 MiB bit vector needs >
> > 2^32 bits for length...
> 
> AFAIK, no 32-bit OS supports files larger than 4Gb anyway.

Um. No. There's a reason that things like the macro _LARGE_FILE_API exist. 
While some file systems won't allow larger file sizes, that's generally an FS 
limitation, not an OS limitation. The OSes provide ways to operate on 64-bit 
files on 32-bit systems. If they didn't, it would be impossible to do something 
like read a Blu-ray on a 32-bit system.

http://en.wikipedia.org/wiki/Large_file_support

- Jonathan M Davis


More information about the Digitalmars-d mailing list