summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-12-01 16:48:40 -0500
committerEliot Horowitz <eliot@10gen.com>2009-12-01 16:48:40 -0500
commit7564ceb7747368740250f0dbc6766fcf772ea614 (patch)
treeb840ffabc417162e9a2a8758ce98164800a72b3d
parentc582756bcba264f30f6d779c1418b2c92d7f7267 (diff)
downloadmongo-7564ceb7747368740250f0dbc6766fcf772ea614.tar.gz
better 32-bit error message
-rw-r--r--util/mmap_posix.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/mmap_posix.cpp b/util/mmap_posix.cpp
index 4b6d0f5c3f9..25deb871f92 100644
--- a/util/mmap_posix.cpp
+++ b/util/mmap_posix.cpp
@@ -71,6 +71,9 @@ namespace mongo {
view = mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
if ( view == MAP_FAILED ) {
out() << " mmap() failed for " << filename << " len:" << length << " errno:" << errno << endl;
+ if ( errno == ENOMEM ){
+ out() << " mmap failed with out of memory, if you're using 32-bits, then you probably need to upgrade to 64" << endl;
+ }
return 0;
}
return view;