diff options
| author | 2014-05-24 00:07:47 +0000 | |
|---|---|---|
| committer | 2014-05-24 00:07:48 +0000 | |
| commit | 132236a802a82cc7d27f82e34e40082ef5c17375 (patch) | |
| tree | ee42dc65d16bf438a21958438d5f8c8e9ec91956 | |
| parent | a911a4d2cac3e885298ac38f8ae6a85c9e9bc9b5 (diff) | |
| parent | d07a913797531a5cf6b81e623daaea21e8e5bcc3 (diff) | |
Merge "Improve invalid large object free dumping."
| -rw-r--r-- | runtime/gc/space/large_object_space.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/gc/space/large_object_space.cc b/runtime/gc/space/large_object_space.cc index e63cc3980d..54a63f065d 100644 --- a/runtime/gc/space/large_object_space.cc +++ b/runtime/gc/space/large_object_space.cc @@ -141,8 +141,10 @@ mirror::Object* LargeObjectMapSpace::Alloc(Thread* self, size_t num_bytes, size_t LargeObjectMapSpace::Free(Thread* self, mirror::Object* ptr) { MutexLock mu(self, lock_); MemMaps::iterator found = mem_maps_.find(ptr); - CHECK(found != mem_maps_.end()) << "Attempted to free large object" << ptr - << "which was not live"; + if (UNLIKELY(found == mem_maps_.end())) { + Runtime::Current()->GetHeap()->DumpSpaces(LOG(ERROR)); + LOG(FATAL) << "Attempted to free large object " << ptr << " which was not live"; + } DCHECK_GE(num_bytes_allocated_, found->second->Size()); size_t allocation_size = found->second->Size(); num_bytes_allocated_ -= allocation_size; |