0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

remap errors should be fatal (posix only)

This commit is contained in:
Mathias Stearn 2011-01-05 12:42:38 -05:00
parent 42c57258cd
commit a46248bdf6

View File

@ -140,9 +140,9 @@ namespace mongo {
void * x = mmap( oldPrivateAddr, len , PROT_READ|PROT_WRITE , MAP_PRIVATE|MAP_FIXED , fd , 0 );
if( x == MAP_FAILED ) {
int err = errno;
assert( munmap(oldPrivateAddr,len) == 0 );
remove(views.begin(), views.end(), oldPrivateAddr);
massert(13601, str::stream() << "Couldn't remap private view: " << errnoWithDescription(err), false);
error() << "13601 Couldn't remap private view: " << errnoWithDescription(err) << endl;
log() << "aborting" << endl;
abort();
}
assert( x == oldPrivateAddr );
return x;