By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,234 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,234 IT Pros & Developers. It's quick & easy.

Maximum file size for open()

P: n/a
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

Feb 24 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
* su*******@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?
Feb 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.