[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Max file Size for fwrite() function
From: |
David Kremer |
Subject: |
Re: Max file Size for fwrite() function |
Date: |
Tue, 26 May 2009 13:03:44 +0200 |
> David,
>
> Can you provide a simple example demonstrating the problem?
>
> Ben
>
>
Yes, surely :
%%%% Beginning of octave script
%% Demonstrating impossibility to write more than 2Go by a single file
%% Be care of space disk available (must be > 2 Go)
fd = fopen( "test.bin" , "wb" ) ;
for k = [ 1:300 ]
fwrite( fd , randn(1024,1024) , "double");
end ;
fclose( fd ) ;
ls -lh
% 'double' on x86 platform is 8 octets big, so each randn(1024,1024)
% call gives a 8 Mo matrix size. So, 300 matrix is 300x8 = 2400 Mo,
% which is larger than 2Go. Please try, and read the exact size of
% 'test.bin' to check if your file is bigger than 2 Go.
signature.asc
Description: Ceci est une partie de message numériquement signée