CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2001
    Posts
    745

    Do anyone know about this?

    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..

  2. #2
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    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.

  3. #3
    Join Date
    Aug 2002
    Location
    VA, USA
    Posts
    137
    I believe windows does have 64 bit file offset support. See docs
    for low level file stuff like: _lseeki64, _telli64.

    regards, willchop

  4. #4
    Join Date
    Jun 2001
    Location
    Mi
    Posts
    1,249
    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 ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured