From ba59b00736b5b8dc0f0bd46397575aaf0cd4d44f Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Thu, 1 Mar 2012 13:43:25 +0100 Subject: Imported Upstream version 2.0.3 --- db/dbcommands.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'db/dbcommands.cpp') 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(); -- cgit v1.2.3