예제 #1
0
파일: mongommf.cpp 프로젝트: rathboma/mongo
 bool MongoMMF::create(string fname, unsigned long long& len, bool sequentialHint) { 
     setPath(fname);
     _view_write = map(fname.c_str(), len, sequentialHint ? SEQUENTIAL : 0);
     if( cmdLine.dur && !testIntent && _view_write ) { 
         dur::createdFile(fname, len);
     }
     return finishOpening();
 }
예제 #2
0
파일: mongommf.cpp 프로젝트: pdex/mongo
 bool MongoMMF::create(string fname, unsigned long long& len, bool sequentialHint) {
     setPath(fname);
     bool preExisting = MemoryMappedFile::exists(fname.c_str());
     _view_write = map(fname.c_str(), len, sequentialHint ? SEQUENTIAL : 0);
     if( cmdLine.dur && _view_write && !preExisting ) {
         getDur().createdFile(fname, len);
     }
     return finishOpening();
 }
예제 #3
0
파일: mongommf.cpp 프로젝트: pdex/mongo
 bool MongoMMF::open(string fname, bool sequentialHint) {
     setPath(fname);
     _view_write = mapWithOptions(fname.c_str(), sequentialHint ? SEQUENTIAL : 0);
     return finishOpening();
 }
예제 #4
0
 bool DurableMappedFile::create(const std::string& fname, unsigned long long& len, bool sequentialHint) {
     LOG(3) << "mmf create " << fname << endl;
     setPath(fname);
     _view_write = map(fname.c_str(), len, sequentialHint ? SEQUENTIAL : 0);
     return finishOpening();
 }
예제 #5
0
 bool DurableMappedFile::open(const std::string& fname, bool sequentialHint) {
     LOG(3) << "mmf open " << fname << endl;
     setPath(fname);
     _view_write = mapWithOptions(fname.c_str(), sequentialHint ? SEQUENTIAL : 0);
     return finishOpening();
 }