Re: reading in text files
Re: reading in text files
- Subject: Re: reading in text files
- From: "Erik M. Buck" <email@hidden>
- Date: Fri, 1 Feb 2002 15:05:07 -0600
>
How would one have it read in only a continuous series
>
of chunks and have it parse them, while minimizing monkeying
>
around with chunk boundary conditions?
>
One would use NSData to map the file into virtual memory and then let the
operating system take care of swapping pages of memory in and out as needed.
Mach is tuned for exactly that use. Unfortunately, the practical limit for
that type of data manipulation is ~2Gb. Beyond that, the OS runs into
address space limitations. Files larger than ~2Gb can represent a hassle. I
suspect the best approach for such files is to use traditional Unix I/O
based on streams. Fast random access files larger than 2Gb is a problem for
now.