Large object space
The large object space helps prevent fragmentation by putting large objects in mem maps insead of the alloc space.
Instead of mark and live bitmaps it uses mark and live sets.
Change-Id: Iada5db70b88a1572007d8af921fa353681a55dc7
diff --git a/src/heap_bitmap.cc b/src/heap_bitmap.cc
index 9cab8c2..cef6884 100644
--- a/src/heap_bitmap.cc
+++ b/src/heap_bitmap.cc
@@ -28,4 +28,22 @@
bitmaps_.push_back(bitmap);
}
+void HeapBitmap::SetLargeObjects(SpaceSetMap* large_objects) {
+ DCHECK(large_objects != NULL);
+ large_objects_ = large_objects;
+}
+
+HeapBitmap::HeapBitmap(Heap* heap) : heap_(heap), large_objects_(NULL) {
+
+}
+
+void HeapBitmap::Walk(SpaceBitmap::Callback* callback, void* arg) {
+ // TODO: C++0x auto
+ for (Bitmaps::iterator it = bitmaps_.begin(); it != bitmaps_.end(); ++it) {
+ (*it)->Walk(callback, arg);
+ }
+
+ large_objects_->Walk(callback, arg);
+}
+
} // namespace art