summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-26 12:01:58 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-26 12:01:58 -0500
commit440c54506b12cf6581b9d860a41a37c8afebc5ab (patch)
tree6376c5d257672735a0b67454e4587817b3d3712e
parentd4c4acf737d55fc5e7008c056eafbe40dcbdcd48 (diff)
downloadmongo-440c54506b12cf6581b9d860a41a37c8afebc5ab.tar.gz
more debugging on win32
-rw-r--r--util/mmap_win.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/util/mmap_win.cpp b/util/mmap_win.cpp
index b6301ce6aa5..19a5b1bbf7b 100644
--- a/util/mmap_win.cpp
+++ b/util/mmap_win.cpp
@@ -58,8 +58,12 @@ namespace mongo {
void *p = MapViewOfFileEx(maphandle, FILE_MAP_COPY, 0, 0,
/*dwNumberOfBytesToMap 0 means to eof*/0 /*len*/,
oldPrivateAddr);
-
- assert(p);
+
+ if ( p == 0 ) {
+ DWORD e = GetLastError();
+ log() << "MapViewOfFileEx failed " << filename() << " " << errnoWithDescription(e) << endl;
+ assert(p);
+ }
assert(p == oldPrivateAddr);
return p;
}