Fix dumpsys meminfo <pid>.
Added a case for BumpPointerSpaces. Confirmed working non-debug.
Should also work in debug builds.
Bug: 11830794
Change-Id: I12053ff16eec403dcd4a780e13095e3212a77132
diff --git a/runtime/gc/space/bump_pointer_space.h b/runtime/gc/space/bump_pointer_space.h
index 9b0b6aa..2edd3e2 100644
--- a/runtime/gc/space/bump_pointer_space.h
+++ b/runtime/gc/space/bump_pointer_space.h
@@ -120,7 +120,11 @@
static mirror::Object* GetNextObject(mirror::Object* obj)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- // Alignment.
+ virtual BumpPointerSpace* AsBumpPointerSpace() {
+ return this;
+ }
+
+ // Object alignment within the space.
static constexpr size_t kAlignment = 8;
protected:
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h
index 38b602e..ca39175 100644
--- a/runtime/gc/space/space.h
+++ b/runtime/gc/space/space.h
@@ -43,6 +43,7 @@
namespace space {
class AllocSpace;
+class BumpPointerSpace;
class ContinuousSpace;
class DiscontinuousSpace;
class MallocSpace;
@@ -138,6 +139,10 @@
bool IsBumpPointerSpace() const {
return GetType() == kSpaceTypeBumpPointerSpace;
}
+ virtual BumpPointerSpace* AsBumpPointerSpace() {
+ LOG(FATAL) << "Unreachable";
+ return NULL;
+ }
// Does this space hold large objects and implement the large object space abstraction?
bool IsLargeObjectSpace() const {