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

mmap not finished on posix for dur yet working on it

This commit is contained in:
dwight 2010-12-06 20:36:05 -05:00
parent 03984ad0df
commit 00484e8a32

View File

@ -124,6 +124,9 @@ namespace mongo {
}
return 0;
}
else {
views.push_back(x);
}
return x;
}
@ -164,6 +167,13 @@ namespace mongo {
if (! views.empty() ) assert(mprotect(views[0], len, PROT_READ) == 0);
}
void* MemoryMappedFile::remapPrivateView(void *oldPrivateAddr) {
remove(views.begin(), views.end(), oldPrivateAddr);
bool ok = UnmapViewOfFile(oldPrivateAddr);
dassert(ok);
return createPrivateMap();
}
void* MemoryMappedFile::remapPrivateView(void *oldPrivateAddr) {
assert(false);
return 0;