| 231 | } |
| 232 | |
| 233 | bool UnderMemoryPressure(double* current_capacity_pct) { |
| 234 | InitLimits(); |
| 235 | int64_t consumption = CurrentConsumption(); |
| 236 | if (consumption < g_pressure_threshold) { |
| 237 | return false; |
| 238 | } |
| 239 | if (current_capacity_pct) { |
| 240 | *current_capacity_pct = static_cast<double>(consumption) / g_hard_limit * 100; |
| 241 | } |
| 242 | return true; |
| 243 | } |
| 244 | |
| 245 | bool SoftLimitExceeded(double* current_capacity_pct) { |
| 246 | InitLimits(); |
nothing calls this directly
no test coverage detected