Damien wrote:
> I have been using J in a professional context for a few months now.
> I have currenty a problem with big files. I want to read a 4.5GB text file
> in 1 time. Obviously I do not want to cut it off.
> I tried to simply read it with 'fread', but I get an out of memory error.
> However, my pc configuration is : Red hat enterprise (2.6.9-55), intel Xeon
> 64-bits, 8 GB of RAM. So I do not understand why It failed.

This happens because 8GB ram is insuffient to do any manipulations on a
4.5GB character string. A simple test such as X = LF would require
another object created of the same size, so this would immediately fail.
The fread utility does quite a bit of work, so this will also fail.

You need to read the file in much smaller chunks. The verb freadblock
from the file script may be helpful.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to