summaryrefslogtreecommitdiff
path: root/db/extsort.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'db/extsort.cpp')
-rw-r--r--db/extsort.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/extsort.cpp b/db/extsort.cpp
index 949c2e66500..751c63e650f 100644
--- a/db/extsort.cpp
+++ b/db/extsort.cpp
@@ -204,7 +204,8 @@ namespace mongo {
BSONObjExternalSorter::FileIterator::FileIterator( string file ){
long length;
- _buf = (char*)_file.map( file.c_str() , length );
+ _buf = (char*)_file.map( file.c_str() , length , MemoryMappedFile::SEQUENTIAL );
+ massert( "mmap failed" , _buf );
assert( (unsigned long)length == file_size( file ) );
_end = _buf + length;
}