AdjustOOMScore sets the oom score for the provided pid. If the provided score is out of range (-1000 - 1000), it is clipped to the min/max value.
(pid, score int)
| 36 | // AdjustOOMScore sets the oom score for the provided pid. If the provided score |
| 37 | // is out of range (-1000 - 1000), it is clipped to the min/max value. |
| 38 | func AdjustOOMScore(pid, score int) error { |
| 39 | if score > OOMScoreAdjMax { |
| 40 | score = OOMScoreAdjMax |
| 41 | } else if score < OOMScoreAdjMin { |
| 42 | score = OOMScoreAdjMin |
| 43 | } |
| 44 | return SetOOMScore(pid, score) |
| 45 | } |
| 46 | |
| 47 | // SetOOMScore sets the oom score for the provided pid |
| 48 | func SetOOMScore(pid, score int) error { |
nothing calls this directly
no test coverage detected
searching dependent graphs…