Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c6a3f7d8 authored by Liam Mark's avatar Liam Mark
Browse files

proc: fix conversion of oom_score_adj to oom_adj



Ensure that oom_score_adj values are properly converted to
oom_adj values by rounding appropriately.

When there is an attempt to calculate an oom_adj value from its
oom_score_adj value the lack of precision results in an oom_adj
value that is one less than it should be.

For example the oom_adj calculated from oom_score_adj 117 is
calculated as 1.989  (117*17 / 1000), and this is rounded to
1 (and not 2 as it should be).

By properly generating oom_adj values backward compatibility is
better supported.

Change-Id: I7f102cf445e572b8e855a9d6b0cf91e3c438eabf
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent 54f3fb1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment