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.h3
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);