summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2019-03-05 10:03:09 -0500
committerMatt Lord <mattalord@gmail.com>2019-03-05 10:03:16 -0500
commit602bfb9c52b2274d55492f73eeac8513d9048d10 (patch)
treefbb2f37088ce7311bfa00ff72c0d4f237cfc2c09 /src/mongo
parent5e9df07fa5d0fdb0a26706473f580dbbde1e4baa (diff)
downloadmongo-602bfb9c52b2274d55492f73eeac8513d9048d10.tar.gz
SERVER-16571 Apply linter fixes to original fix
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/util/processinfo_linux.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp
index ae3a1ca414c..4ac9d72842c 100644
--- a/src/mongo/util/processinfo_linux.cpp
+++ b/src/mongo/util/processinfo_linux.cpp
@@ -410,12 +410,16 @@ public:
/*
* If memory is being limited by the applied control group and it's less
* than the OS system memory (default cgroup limit is ulonglong max) let's
- * return the actual memory we'll have available to the process.
+ * return the actual memory we'll have available to the process.
*/
unsigned long long cgroupMemBytes = 0;
- std::string cgmemlimit = readLineFromFile("/sys/fs/cgroup/memory/memory.limit_in_bytes");
- if (!cgmemlimit.empty() && mongo::parseNumberFromString(cgmemlimit, &cgroupMemBytes).isOK() && cgroupMemBytes < systemMemBytes) {
- log() << "cgroup memory limit of " << cgroupMemBytes << " bytes detected -- using this as the applicable memory limit";
+ std::string cgmemlimit =
+ readLineFromFile("/sys/fs/cgroup/memory/memory.limit_in_bytes");
+ if (!cgmemlimit.empty() &&
+ mongo::parseNumberFromString(cgmemlimit, &cgroupMemBytes).isOK() &&
+ cgroupMemBytes < systemMemBytes) {
+ log() << "cgroup memory limit of " << cgroupMemBytes
+ << " bytes detected -- using this as the applicable memory limit";
return cgroupMemBytes;
}