Add method for reading VmRSS from status

This change adds StatusVmRSS() and StatusVmRSSFromFile() for reading
VmRSS from /proc/<pid>/status. This is intended to be used for grabbing
RSS cheaply in cases where a smaps/maps read is not desired. This should
only be used when accuracy is not essential, as VmRSS is not accurate
due to a kernel optimization.

The error in VmRSS as calculated by the kernel is not documented.
However, local testing places the error at 1-5% for most processes, and
a large overestimate for some processes (e.g. ~20% for surfaceflinger
and launcher; ~50% for cameraprovider when the camera is active).

Test: Added test cases to libmeminfo_test
Bug: 296454553
Change-Id: I75c840ba667efa5e9b3ffb5e687f6f867fba43aa
4 files changed