diff --git a/FWCore/Services/plugins/SimpleMemoryCheck.cc b/FWCore/Services/plugins/SimpleMemoryCheck.cc index 98fb253ae5a62..f401de42c89fc 100644 --- a/FWCore/Services/plugins/SimpleMemoryCheck.cc +++ b/FWCore/Services/plugins/SimpleMemoryCheck.cc @@ -436,7 +436,7 @@ namespace edm { } double SimpleMemoryCheck::averageGrowthRate(double current, double past, int count) { - return (current - past) / (double)count; + return (current - past) / (double)std::max(count, 1); } SimpleMemoryCheck::SimpleMemoryCheck(ParameterSet const& iPS, ActivityRegistry& iReg)