[NFC][sanitizer] Move StackStore::Allocated into cpp file
authorVitaly Buka <vitalybuka@google.com>
Tue, 23 Nov 2021 20:41:28 +0000 (12:41 -0800)
committerVitaly Buka <vitalybuka@google.com>
Tue, 23 Nov 2021 20:46:19 +0000 (12:46 -0800)
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.cpp
compiler-rt/lib/sanitizer_common/sanitizer_stack_store.h

index ad88e2b..74be6df 100644 (file)
@@ -31,6 +31,10 @@ StackTrace StackStore::Load(Id id) {
   return StackTrace(stack_trace + 1, size, tag);
 }
 
+uptr StackStore::Allocated() const {
+  return atomic_load_relaxed(&mapped_size_);
+}
+
 uptr *StackStore::TryAlloc(uptr count) {
   // Optimisic lock-free allocation, essentially try to bump the region ptr.
   for (;;) {
index b5bbdcc..35602d2 100644 (file)
@@ -24,7 +24,7 @@ class StackStore {
 
   Id Store(const StackTrace &trace);
   StackTrace Load(Id id);
-  uptr Allocated() const { return atomic_load_relaxed(&mapped_size_); }
+  uptr Allocated() const;
 
   void TestOnlyUnmap();