scudo-standalone: Add GetRSS method on Linux
authorBastian Kersting <bkersting@google.com>
Thu, 8 Dec 2022 20:22:42 +0000 (12:22 -0800)
committerVitaly Buka <vitalybuka@google.com>
Thu, 8 Dec 2022 21:38:24 +0000 (13:38 -0800)
commitcc02d61b459ff351fc785bd8154fc2e5beb95e92
tree111b3c8e95e51c7a89bcfec3549ea2d66d5bb097
parentc02782fc22653fbf0f170a5acbdbe871b23e8677
scudo-standalone: Add GetRSS method on Linux

This change adds a GetRSS method on Linux that parses
the number from /proc/self/statm. This change is part
of splitting up https://reviews.llvm.org/D126752.

Reviewed By: vitalybuka, cryptoad

Differential Revision: https://reviews.llvm.org/D139430
compiler-rt/lib/scudo/standalone/common.cpp
compiler-rt/lib/scudo/standalone/common.h
compiler-rt/lib/scudo/standalone/linux.cpp
compiler-rt/lib/scudo/standalone/tests/common_test.cpp