eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
358 stars 105 forks source link

Add oom_score_adj Process methods #298

Closed futpib closed 5 months ago

futpib commented 6 months ago

I took note of this comment: https://github.com/eminence/procfs/pull/139#pullrequestreview-737802630:

So the way I read this is: while the final OOM "score" will be somewhere between 0 and 1000, the value reported in oom_score_adj can be between -1000 and 1000. So I think the oom_score_adj function should return a i16 not u32.

And changed oom_score type to u16 too, since it too only ranges from 0 to 1000.

Previous attempt: https://github.com/eminence/procfs/pull/139

eminence commented 5 months ago

LGTM, thanks!