summaryrefslogtreecommitdiff
path: root/db/dbcommands.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2012-03-01 13:43:25 +0100
committerAntonin Kral <a.kral@bobek.cz>2012-03-01 13:43:25 +0100
commitba59b00736b5b8dc0f0bd46397575aaf0cd4d44f (patch)
tree6364cf3f69677758a13f7aa5f6f06a8ebb652d98 /db/dbcommands.cpp
parentf0d9a01bccdaeb466c12c92057914bbfef59526c (diff)
downloadmongodb-ba59b00736b5b8dc0f0bd46397575aaf0cd4d44f.tar.gz
Imported Upstream version 2.0.3
Diffstat (limited to 'db/dbcommands.cpp')
-rw-r--r--db/dbcommands.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp
index b2e6218..fc6327c 100644
--- a/db/dbcommands.cpp
+++ b/db/dbcommands.cpp
@@ -514,7 +514,15 @@ namespace mongo {
if( overhead > 4000 ) {
t.append("note", "virtual minus mapped is large. could indicate a memory leak");
- log() << "warning: virtual size (" << v << "MB) - mapped size (" << m << "MB) is large (" << overhead << "MB). could indicate a memory leak" << endl;
+
+ static time_t last = 0;
+ time_t now = time(0);
+
+ if ( last + 60 < now ) {
+ last = now;
+ log() << "warning: virtual size (" << v << "MB) - mapped size (" << m << "MB) is large (" << overhead << "MB). could indicate a memory leak" << endl;
+ }
+
}
t.done();