Re: Open for access/out of memory
Re: Open for access/out of memory
- Subject: Re: Open for access/out of memory
- From: Shane Stanley <email@hidden>
- Date: Thu, 15 Nov 2001 09:49:33 +1100
On 15/11/01 4:00 AM +1000, email@hidden, email@hidden,
wrote:
>
Does anyone know the memory limitations of the "read" command. I.e. read
>
myFile until return. This is the command typically associated with the open
>
for access and close access commands. The read command works great for the
>
most part, but I'll get a Finder "out of memory" error if I try to read a
>
line from a 400K file. There is plenty of RAM available on the machine.
The "read until/before" command seems to read the whole file into a buffer
first, which is why you can get memory problems. It's safer to use "read
for" and read in a chunk, and then parse that.
--
Shane Stanley, email@hidden