Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: {Slightly O/T} Maximum file size on hard drive

Author: Anthony Cozzie

Date: 14:50:07 12/13/03

Go up one level in this thread


On December 13, 2003 at 17:00:27, Dieter Buerssner wrote:

>On December 13, 2003 at 16:50:39, Anthony Cozzie wrote:
>
>>Maximum file size depends on the filesystem.  I run XFS (SGI's filesystem) on
>>Linux, and my max file size is 2^64 bytes :)  The problem is that the standard C
>>library uses signed 32 bit integers to index the file offset, so the practical
>>limit for 32 bit processors is 2GB.
>
>You are probably commenting about fseek() where the offset in Standard C is a
>long. Will fseek (and other Standard C functions) work on files > 2 or 4 GB on
>your system (I assume you have 32 bit long). Say, when you want to go ahead in
>the file for 6 GB and you call fseek(fp, 1500000000, SEEK_CUR); three times in a
>row?
>
>I know, there are other methods, but I try to stay with Standard C.
>
>Regards,
>Dieter

There are some defines on Linux to use 64 bit file offsets, I think.  I know
there are 64 bit versions of fseek, ftell, etc on Linux.

anthony



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.