Click to See Complete Forum and Search --> : Do anyone know about this?


Kohinoor24
March 13th, 2003, 01:52 AM
Under Linux,It is said that, As a 32-bit UNIX system, Linux can handle files not longer than 2Gb. The limitation is due to 32-bit integer size, which gives the largest possible file of 2^31-1 bytes. so it is said that we have to use the LFS(Large File support).

How about windows then?In windows also int is 4 bytes(32 bit).How is windows handling this.

Under Linux,I was able to open a file of size 3.8GB with the fopen command.

Is this limited to the c style Input/output under Linux and If I use the c++ input /output.There is no trouble.

Could anyone Enlighten me on this matter.

Thanks..

PaulWendt
March 13th, 2003, 05:15 AM
Read the OS documentation about file sizes. Basically, with 32-bit
integers, you will typically have 4GB or 2GB. If they use the high
bit for something else then their maximum file size will be 2GB.
I don't know about the specifics here, but it looks like [with your
multiple posts] you have a program that you didn't write that
can only support 2GB whereas a program you write can support
4GB? If this is the case, then it's the software that's the culprit,
not the OS.

willchop
March 13th, 2003, 08:57 AM
I believe windows does have 64 bit file offset support. See docs
for low level file stuff like: _lseeki64, _telli64.

regards, willchop

M Owen
March 13th, 2003, 10:00 AM
The difference is whether using a long or an UNSIGNED long ... There is your 2 gig/4 gig difference ... Now what Win 2K/XP is using now (64 bit #'s) I don't know ..