Read memory stats from /proc/pid/stat file.
(cherry pick from commit 0301683e49ab255769b15469487feaab3466167a)
Bug: 117333340
Test: Manual testing using alloc-stress tool
Merged-In: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd
Change-Id: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd
diff --git a/lmkd/statslog.h b/lmkd/statslog.h
index edebb19..8458480 100644
--- a/lmkd/statslog.h
+++ b/lmkd/statslog.h
@@ -67,6 +67,9 @@
};
#define MEMCG_PROCESS_MEMORY_STAT_PATH "/dev/memcg/apps/uid_%u/pid_%u/memory.stat"
+#define PROC_STAT_FILE_PATH "/proc/%d/stat"
+#define PROC_STAT_BUFFER_SIZE 1024
+#define BYTES_IN_KILOBYTE 1024
/**
* Logs the change in LMKD state which is used as start/stop boundaries for logging