diff options
-rw-r--r-- | src/mongo/util/mmap_win.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/util/mmap_win.cpp b/src/mongo/util/mmap_win.cpp index a48eb149bb2..a95549614af 100644 --- a/src/mongo/util/mmap_win.cpp +++ b/src/mongo/util/mmap_win.cpp @@ -371,6 +371,18 @@ namespace mongo { &oldProtection ); if ( !ok ) { DWORD dosError = GetLastError(); + + if (dosError == ERROR_COMMITMENT_LIMIT) { + // System has run out of memory between physical RAM & page file, tell the user + BSONObjBuilder bb; + + ProcessInfo p; + p.getExtraInfo(bb); + + log() << "MongoDB has exhausted the system memory capacity."; + log() << "Current Memory Status: " << bb.obj().toString(); + } + log() << "VirtualProtect for " << mmf->filename() << " chunk " << chunkno << " failed with " << errnoWithDescription( dosError ) |