Add benchmarks for heap size retrieval
Add benchmarks for mallinfo, and for retrieving RSS from
/proc/self/statm, since we're considering using these for GC
triggering.
Add some static linkage specifiers, after running into a build
problem due to a spurious conflict.
Bug: 111447610
Test: Ran benchmarks
Change-Id: Ie50d512294993882728c63ce51ec507590257d80
diff --git a/benchmarks/atomic_benchmark.cpp b/benchmarks/atomic_benchmark.cpp
index dcea1c8..ea008d4 100644
--- a/benchmarks/atomic_benchmark.cpp
+++ b/benchmarks/atomic_benchmark.cpp
@@ -37,13 +37,13 @@
// We assume that the compiler is not smart enough to optimize away fences in a single-threaded
// program. If that changes, we'll need to add a second thread.
-volatile unsigned counter;
+static volatile unsigned counter;
std::atomic<int> test_loc(0);
-volatile unsigned sink;
+static volatile unsigned sink;
-std::mutex mtx;
+static std::mutex mtx;
void BM_atomic_empty(benchmark::State& state) {
while (state.KeepRunning()) {