oomd: switch system context parsing to use /proc/meminfo

Makes it easier in the next commits to unify on one way to read swap and
memory info.
This commit is contained in:
Anita Zhang
2021-06-30 03:47:26 -07:00
parent 4dbad977ff
commit 47136b9d9a
6 changed files with 106 additions and 70 deletions
+3
View File
@@ -15,3 +15,6 @@ int procfs_memory_get(uint64_t *ret_total, uint64_t *ret_used);
static inline int procfs_memory_get_used(uint64_t *ret) {
return procfs_memory_get(NULL, ret);
}
/* This function destroys "word" (it'll be truncated to perform conversion) */
int convert_meminfo_value_to_uint64_bytes(char *word, uint64_t *ret);