diff options
author | 2022-10-12 10:25:23 -0700 | |
---|---|---|
committer | 2022-12-05 18:17:40 +0000 | |
commit | 485a714cbfa146528f7db9395197d855af43e188 (patch) | |
tree | 914b9c764f1cc81938fb09d94e6a27bbe6e5562e /runtime/linear_alloc-inl.h | |
parent | 13c3ce1edf7fa9e8e97fb60625a62cb97a13f9a9 (diff) |
Make native GC-root updation concurrent with userfaultfd
Additionally also uses userfaultfd's minor-fault feature for moving
space.
Bug: 160737021
Test: ART_USE_READ_BARRIER=false art/test/testrunner/testrunner.py and module install
Change-Id: I98b0c69fba4aec1263b1f38cc9f31494fd5c8cf5
Diffstat (limited to 'runtime/linear_alloc-inl.h')
-rw-r--r-- | runtime/linear_alloc-inl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/linear_alloc-inl.h b/runtime/linear_alloc-inl.h index a6b3df3ae6..928bffbc1c 100644 --- a/runtime/linear_alloc-inl.h +++ b/runtime/linear_alloc-inl.h @@ -26,6 +26,9 @@ namespace art { inline void LinearAlloc::SetFirstObject(void* begin, size_t bytes) const { DCHECK(track_allocations_); + if (ArenaAllocator::IsRunningOnMemoryTool()) { + bytes += ArenaAllocator::kMemoryToolRedZoneBytes; + } uint8_t* end = static_cast<uint8_t*>(begin) + bytes; Arena* arena = allocator_.GetHeadArena(); DCHECK_NE(arena, nullptr); |