summaryrefslogtreecommitdiff
path: root/runtime/linear_alloc-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/linear_alloc-inl.h')
-rw-r--r--runtime/linear_alloc-inl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/linear_alloc-inl.h b/runtime/linear_alloc-inl.h
index 928bffbc1c..13dbea11d0 100644
--- a/runtime/linear_alloc-inl.h
+++ b/runtime/linear_alloc-inl.h
@@ -40,6 +40,12 @@ inline void LinearAlloc::SetFirstObject(void* begin, size_t bytes) const {
down_cast<TrackedArena*>(arena)->SetFirstObject(static_cast<uint8_t*>(begin), end);
}
+inline void LinearAlloc::SetupForPostZygoteFork(Thread* self) {
+ MutexLock mu(self, lock_);
+ DCHECK(track_allocations_);
+ allocator_.ResetCurrentArena();
+}
+
inline void* LinearAlloc::Realloc(Thread* self,
void* ptr,
size_t old_size,