Re: std::IStream size limitation
I'm using IStream (basic_iostream class to be specific)
interface and I am trying to store
I'm not sure I understand. The class is std::istream, not
IStream, it is a typedef for an instanciation of
std::basic_istream, not std::basic_iostream, and it doesn't
support writing, only reading.
very large Unicode XML data into a stream and it
seems to be overflowing.
And if you are working with Unicode, you probably want
std::wostream, rather than std::ostream.
The symptom for the overflow *seems* to be
related to the size of the data that I am trying to stream in. If the
amount of data gets too large (for e.g. 128MB+) the data gets corrupted
and for XML, it obviously becomes useless. The amount of memory on my
system is 4GB, so it is NOT a physical memory problem.
The only limitations to the size are normally those concerning
the maximum size of a file imposed by the operating system.
Something which should be, at the very least, in the order of
If anyone else has experienced any limitations with IStream
and would like to share their experiences with me, I would
really appreciate that!
Does anyone have any efficient code examples to utilize
std::istream doesn't have a member SetSize. You can use setbuf
to control the buffer size, but this is usually
counter-productive; a good implementation will automatically use
the best buffer size if you let it.
James Kanze GABI Software
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]