Show size/alloc/free per Dalvik heap space in dumpsys
Add the heap size/alloc/free stats to the Dalvik heap space breakdown section in dumpsys meminfo.
Also, now the zygote heap has a distict ashmem region name.
Bug: 9532137
Bug: 8266259
Change-Id: Ieeb02f5f5ebf7ffe35d4b55ad81d46989af2827b
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index feccba3..f978c6a 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -307,11 +307,7 @@
// Implements java.lang.Runtime.totalMemory, returning the amount of memory consumed by an
// application.
- int64_t GetTotalMemory() const {
- // TODO: we use the footprint limit here which is conservative wrt number of pages really used.
- // We could implement a more accurate count across all spaces.
- return max_allowed_footprint_;
- }
+ int64_t GetTotalMemory() const;
// Implements java.lang.Runtime.freeMemory.
int64_t GetFreeMemory() const {