This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Default buffer size of class basic_filebuf


Hello!

I want to figure out the default buffer-size of the class basic_filebuf.
I know the member function pubsetbuf() and it seems to have a great
impact on the performance during file copy.

Question: Where I can find the default buffer size for basic_filebuf?


The standard for C++ doesn't define a member function pubgetbuf() or
something like this, also the member function is_avail() doesn't help
either. I can't find any constant. I know BUFSIZ from <cstdio> and it
defaults on my machine to 8192 Bytes, which performs well for me with
fread()/fwrite() and read()/write().

I doing some testing on simple file copying:
http://stackoverflow.com/questions/10195343/copy-a-file-in-an-sane-safe-and-efficient-way

Thanks
Peter Weber

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]