diff options
| author | 2016-02-15 17:33:36 +0000 | |
|---|---|---|
| committer | 2016-02-15 17:33:36 +0000 | |
| commit | b3871cd241eed77bfdd83c36182c19273c351da6 (patch) | |
| tree | 0968cdebc8e80b7c75205f6f6fbe3c99138a6c09 | |
| parent | af5b2a28ab0b35276fe6e527820ecccc350843bb (diff) | |
| parent | 4fb3a42ae82859603209f23f2025551398eec6ba (diff) | |
Merge "ART: Fix ArenaStack::AllocWithMemoryTool()."
| -rw-r--r-- | runtime/base/scoped_arena_allocator.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/base/scoped_arena_allocator.cc b/runtime/base/scoped_arena_allocator.cc index 90c6ee34ec..7d04fa0223 100644 --- a/runtime/base/scoped_arena_allocator.cc +++ b/runtime/base/scoped_arena_allocator.cc @@ -99,7 +99,7 @@ void* ArenaStack::AllocWithMemoryTool(size_t bytes, ArenaAllocKind kind) { if (UNLIKELY(static_cast<size_t>(top_end_ - ptr) < rounded_bytes)) { ptr = AllocateFromNextArena(rounded_bytes); CHECK(ptr != nullptr) << "Failed to allocate memory"; - MEMORY_TOOL_MAKE_NOACCESS(ptr, top_end_); + MEMORY_TOOL_MAKE_NOACCESS(ptr, top_end_ - ptr); } CurrentStats()->RecordAlloc(bytes, kind); top_ptr_ = ptr + rounded_bytes; |