Maximum file size for open()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sundar261@gmail.com

    Maximum file size for open()

    Hi,

    I am using ifstream open() to open an greater than 5GB file (more 100
    million record) and open() fails to open the file. But I am able to
    open smaller sized files (around 1GB) with the same program

    What is maximum file size that I can open. Is it dependent on number
    of records or file size in bytes?

    What is the best way to open big files?? Do we have any compiler
    specific options that need to be set?

    I am using aCC compiler on HPUX machine.

    -Sundar

  • Alf P. Steinbach

    #2
    Re: Maximum file size for open()

    * sundar261@gmail .com:
    >
    I am using ifstream open() to open an greater than 5GB file (more 100
    million record) and open() fails to open the file. But I am able to
    open smaller sized files (around 1GB) with the same program
    >
    What is maximum file size that I can open. Is it dependent on number
    of records or file size in bytes?
    >
    What is the best way to open big files?? Do we have any compiler
    specific options that need to be set?
    >
    I am using aCC compiler on HPUX machine.
    I can't give you hard facts without checking (which is work), but it
    seems that you're using an implementation with a 32 bit file size / seek
    position. Perhaps some options can be tweaked to support larger files?
    I'd check the compiler or standard library implementation' s documentation.

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?

    Comment

    Working...