problem opening file
Thu Nov 15 12:04:08 CET 2001
Bengt Kleberg wrote:
> > Date: Wed, 14 Nov 2001 13:20:28 -0500
> > From: Garry Hodgson <>
> > i've gt two files in a directory, same permissions, differing
> > by size (and content, of course):
> > $ ls -l *.zone
> > -rw-rw-r-- 1 garry sage 2561435180 Nov 14 13:04 com.zone
> > -rw-rw-r-- 1 garry sage 323447644 Nov 9 11:45 org.zone
> > when i try to open the files, the smaller one works, the larger fails:
> > anybody know why?
> There is nothing in the documentation (apart from the mentioning that
> Erlang is 32-bit only), but com.zone is larger than 2^31 (2 GB), which
> used to be 'too large' in the old days.
> Unless somebody that knows steps in and really explain I conjecture
> that Erlang uses 31 bit filesizes and you have to split the file before
> opening it/them. Or use the FFI and have a C program deliver it in pieces.
That is correct. Erlang cannot handle "large" files i.e 2^31 bytes or
more. We are planning to fix it in R9 if we get the time. The error code
'unknown' could perhaps be patched earlier.
/ Raimo Niskanen, Erlang/OTP, Ericsson UAB
More information about the erlang-questions