Each space has its own bitmap(s)

Each alloc space now has One mark+live bitmap. Each image space has only one live bitmap.

Change-Id: I2e919d1bd7d9f4d35d0e95ed83a58df6f754df6e
diff --git a/src/oatdump.cc b/src/oatdump.cc
index 9bae0d9..b1aa47e 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -552,10 +552,15 @@
     oat_dumper_.reset(new OatDumper(host_prefix_, *oat_file));
 
     os_ << "OBJECTS:\n" << std::flush;
-    HeapBitmap* heap_bitmap = Runtime::Current()->GetHeap()->GetLiveBits();
-    DCHECK(heap_bitmap != NULL);
-    heap_bitmap->Walk(ImageDumper::Callback, this);
-    os_ << "\n";
+
+    // Loop through all the image spaces and dump their objects.
+    Heap* heap = Runtime::Current()->GetHeap();
+    const Spaces& spaces = heap->GetSpaces();
+    // TODO: C++0x auto
+    for (Spaces::const_iterator cur = spaces.begin(); cur != spaces.end(); ++cur) {
+      (*cur)->GetLiveBitmap()->Walk(ImageDumper::Callback, this);
+      os_ << "\n";
+    }
 
     os_ << "STATS:\n" << std::flush;
     UniquePtr<File> file(OS::OpenFile(image_filename_.c_str(), false));