Maximum file size for open()

S

sundar261

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
 
A

Alf P. Steinbach

* (e-mail address removed):
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top