Implement DDMS heap info ("HPIF") chunks.
This lets you see how many bytes/objects are in your managed heap.
Change-Id: Ie925207e9c48989a24968633e60b99314d220865
diff --git a/src/heap.h b/src/heap.h
index 9e21272..2e80571 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -175,6 +175,9 @@
static void AddFinalizerReference(Object* object);
+ static size_t GetBytesAllocated() { return num_bytes_allocated_; }
+ static size_t GetObjectsAllocated() { return num_objects_allocated_; }
+
private:
// Allocates uninitialized storage.
static Object* AllocateLocked(size_t num_bytes);