0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

assert on mmap failure

This commit is contained in:
Eliot Horowitz 2009-12-21 10:20:30 -05:00
parent bbd33359d9
commit 3e2d226bee

View File

@ -205,6 +205,7 @@ namespace mongo {
BSONObjExternalSorter::FileIterator::FileIterator( string file ){
long length;
_buf = (char*)_file.map( file.c_str() , length );
massert( "mmap failed" , _buf );
assert( (unsigned long)length == file_size( file ) );
_end = _buf + length;
}