[NFC][sanitizer] Move StackStore::Allocated into cpp file

This commit is contained in:
Vitaly Buka 2021-11-23 12:41:28 -08:00
parent 14d743457c
commit cdc80a6017
2 changed files with 5 additions and 1 deletions

View 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 (;;) {

View 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();