summaryrefslogtreecommitdiff
path: root/runtime/linear_alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/linear_alloc.h')
-rw-r--r--runtime/linear_alloc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/linear_alloc.h b/runtime/linear_alloc.h
index 1b21527317..df7f17dd7a 100644
--- a/runtime/linear_alloc.h
+++ b/runtime/linear_alloc.h
@@ -47,6 +47,10 @@ class LinearAlloc {
// Return true if the linear alloc contrains an address.
bool Contains(void* ptr) const REQUIRES(!lock_);
+ // Unsafe version of 'Contains' only to be used when the allocator is going
+ // to be deleted.
+ bool ContainsUnsafe(void* ptr) const NO_THREAD_SAFETY_ANALYSIS;
+
private:
mutable Mutex lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
ArenaAllocator allocator_ GUARDED_BY(lock_);