help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Max file Size for fwrite() function


From: Alain Baeckeroot
Subject: Re: Max file Size for fwrite() function
Date: Tue, 26 May 2009 13:46:08 +0200
User-agent: KMail/1.9.9

Le 26/05/2009 à 13:03, David Kremer a écrit :
> > 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. 
> 


i also have 2.0 GB limit on debian lenny, for both octave 3.0.1 (debian)
and 3.1.55 that i builded some times ago.

-rw-r--r-- 1 al al 2,0G mai 26 13:40 test.bin

Tested on two different ext3 filesystems, where i have other files bigger
 than 2.0 GB.

Alain.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]