$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Sunil Kumar N (freakytech_at_[hidden])
Date: 2006-05-17 21:15:24
Could someone point me to a link for a sample program of using
iostreams::mapped_file(except the default tutorial)...I gave a shot at it
and snippet is as follows...
io::mapped_file_params aparams("c:\\mf.txt");
aparams.new_file_size = 1e8;
aparams.mode = BOOST_IOS::out;
io::stream_buffer<io::mapped_file> mfStrmBuf(aparams);
ostream out(&mfStrmBuf);
out << .... keep on writing to file...
it works but I need to know how one create a mapped_file that has to grow
beyond new_file_size!! That means I dont know the size of the file to be
created at compile time!!
How to flush explicitly?
I am in the process of understanding as to which one offers better
performance with respect to time taken when some thousands of lines have to
be written to a file.....ofstream vs mapped_file?
Thanks in advance :)