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:
parent
bbd33359d9
commit
3e2d226bee
@ -205,6 +205,7 @@ namespace mongo {
|
|||||||
BSONObjExternalSorter::FileIterator::FileIterator( string file ){
|
BSONObjExternalSorter::FileIterator::FileIterator( string file ){
|
||||||
long length;
|
long length;
|
||||||
_buf = (char*)_file.map( file.c_str() , length );
|
_buf = (char*)_file.map( file.c_str() , length );
|
||||||
|
massert( "mmap failed" , _buf );
|
||||||
assert( (unsigned long)length == file_size( file ) );
|
assert( (unsigned long)length == file_size( file ) );
|
||||||
_end = _buf + length;
|
_end = _buf + length;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user