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/mem_map.cc b/src/mem_map.cc
index 409e653..9e86772 100644
--- a/src/mem_map.cc
+++ b/src/mem_map.cc
@@ -134,6 +134,13 @@
CHECK_NE(base_size_, 0U);
};
+void MemMap::UnMapAtEnd(byte* new_end) {
+ DCHECK_GE(new_end, Begin());
+ DCHECK_LE(new_end, End());
+ size_t unmap_size = End() - new_end;
+ munmap(new_end, unmap_size);
+ size_ -= unmap_size;
+}
bool MemMap::Protect(int prot) {
if (base_begin_ == NULL && base_size_ == 0) {