hello, everyone:
I¡¯m a newbie to boost::interprocess, It¡¯s really a cool
library,
so I try to write a simple program to test mapped file, it¡¯s really
simple:
#include <boost/interprocess/managed_mapped_file.hpp>
using namespace boost::interprocess;
int main()
{
managed_mapped_file mfile(open_or_create,
"/home/fractal/log.bin",
1024); //hanging here.
return 0;
}
but it¡¯s hanging on the creation of mapped file, I test it both on
ubuntu 11.05(in virtualbox) and openSuse, the same problem remain.
I¡¯m sure the file exists, and I traced down the source code, it seems
the program stuck in a while loop in function
priv_open_or_create(...).
except that, if I set the third argument of constructor from 1024 to
1,
it¡¯s even throw a exception( not good).
any seggestion is appreciated!!!