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:
parent
03984ad0df
commit
00484e8a32
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user