summaryrefslogtreecommitdiff
path: root/runtime/gc/heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/heap.cc')
-rw-r--r--runtime/gc/heap.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 467b22c509..f0f81fc67e 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -1271,6 +1271,10 @@ space::Space* Heap::FindSpaceFromAddress(const void* addr) const {
return nullptr;
}
+std::string Heap::DumpSpaceNameFromAddress(const void* addr) const {
+ space::Space* space = FindSpaceFromAddress(addr);
+ return (space != nullptr) ? space->GetName() : "no space";
+}
void Heap::ThrowOutOfMemoryError(Thread* self, size_t byte_count, AllocatorType allocator_type) {
// If we're in a stack overflow, do not create a new exception. It would require running the