Zygote space / partial collection support.
The zygote space is now created right before zygote fork. This space has new allocations into it disabled, this reduces memory usage since we have more shared pages.
Partial collection works by marking all the zygote space -> alloc space references by using a mod-union table and then recursively marking only over the alloc space.
Approximate improvements;
Deltablue time goes down ~0.5 seconds.
Caffeinemark score goes up ~300.
System memory usage goes down ~7MB.
Change-Id: I198389371d23deacd9b4534f39727eb641786b34
diff --git a/src/heap_bitmap.h b/src/heap_bitmap.h
index 29a7b1f..4333199 100644
--- a/src/heap_bitmap.h
+++ b/src/heap_bitmap.h
@@ -69,11 +69,16 @@
// Find and replace a bitmap pointer, this is used by for the bitmap swapping in the GC.
void ReplaceBitmap(SpaceBitmap* old_bitmap, SpaceBitmap* new_bitmap);
- private:
- void AddSpaceBitmap(SpaceBitmap* space) {
- bitmaps_.push_back(space);
+ HeapBitmap(Heap* heap) : heap_(heap) {
+
}
+ private:
+
+ const Heap* const heap_;
+
+ void AddSpaceBitmap(SpaceBitmap* bitmap);
+
typedef std::vector<SpaceBitmap*> Bitmaps;
Bitmaps bitmaps_;