public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* fstream
@ 2004-04-15 18:13 Jacob Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Jacob Smith @ 2004-04-15 18:13 UTC (permalink / raw)
  To: gcc-help

How would I go about finding out the largest file stream I can open 
(read/write) on my system (P4)? I've ascertained that the 
std::fstream::pos_type has a sizeof() 8, but anytime I access somewhere 
beyond the 2**31-bit mark, the state of the stream becomes 
good()==false. If the maximum size is upper-bound by the 2**31-bit mark 
(or whatever), is there anything in the standard libraries to let me 
open larger files (i.e. a memory-map or sumsuch)?

thanks,

-j.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: fstream
  2004-04-15 18:16 fstream lrtaylor
@ 2004-04-21 21:02 ` TheChao
  0 siblings, 0 replies; 3+ messages in thread
From: TheChao @ 2004-04-21 21:02 UTC (permalink / raw)
  To: gcc-help

With respect to errors generated by seekg/tellg etc. for accessing very 
large files: this is `fixed' in GCC 3.4 (see Runtime Library 
(libstdc++)) at http://gcc.gnu.org/gcc-3.4/changes.html; e.g. Large File 
Support was added to I/O.

-j.

lrtaylor@micron.com wrote:

>I believe the size of the files you can open depend on your operating
>system and file system rather than on C++.  For example, I believe that
>Windows generally doesn't support files larger than 2 GB.  I believe
>most 32-bit Linux distributions also don't generally support files
>larger than 2GB out of the box.  Without knowing what platform and type
>of file system that you're running on, it's hard to say much more,
>though.
>
>Cheers,
>Lyle
>
>-----Original Message-----
>From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
>Behalf Of Jacob Smith
>Sent: Thursday, April 15, 2004 12:14 PM
>To: gcc-help@gcc.gnu.org
>Subject: fstream
>
>How would I go about finding out the largest file stream I can open 
>(read/write) on my system (P4)? I've ascertained that the 
>std::fstream::pos_type has a sizeof() 8, but anytime I access somewhere 
>beyond the 2**31-bit mark, the state of the stream becomes 
>good()==false. If the maximum size is upper-bound by the 2**31-bit mark 
>(or whatever), is there anything in the standard libraries to let me 
>open larger files (i.e. a memory-map or sumsuch)?
>
>thanks,
>
>-j.
>
>  
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: fstream
@ 2004-04-15 18:16 lrtaylor
  2004-04-21 21:02 ` fstream TheChao
  0 siblings, 1 reply; 3+ messages in thread
From: lrtaylor @ 2004-04-15 18:16 UTC (permalink / raw)
  To: jnsmith, gcc-help

I believe the size of the files you can open depend on your operating
system and file system rather than on C++.  For example, I believe that
Windows generally doesn't support files larger than 2 GB.  I believe
most 32-bit Linux distributions also don't generally support files
larger than 2GB out of the box.  Without knowing what platform and type
of file system that you're running on, it's hard to say much more,
though.

Cheers,
Lyle

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Jacob Smith
Sent: Thursday, April 15, 2004 12:14 PM
To: gcc-help@gcc.gnu.org
Subject: fstream

How would I go about finding out the largest file stream I can open 
(read/write) on my system (P4)? I've ascertained that the 
std::fstream::pos_type has a sizeof() 8, but anytime I access somewhere 
beyond the 2**31-bit mark, the state of the stream becomes 
good()==false. If the maximum size is upper-bound by the 2**31-bit mark 
(or whatever), is there anything in the standard libraries to let me 
open larger files (i.e. a memory-map or sumsuch)?

thanks,

-j.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-21 21:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-15 18:13 fstream Jacob Smith
2004-04-15 18:16 fstream lrtaylor
2004-04-21 21:02 ` fstream TheChao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).