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.h b/src/mem_map.h
index f442570..c7744bb 100644
--- a/src/mem_map.h
+++ b/src/mem_map.h
@@ -75,11 +75,14 @@
return begin_ + size_;
}
+ // Trim by unmapping pages at the end of the map.
+ void UnMapAtEnd(byte* new_end);
+
private:
MemMap(byte* begin, size_t size, void* base_begin, size_t base_size, int prot);
byte* const begin_; // Start of data.
- const size_t size_; // Length of data.
+ size_t size_; // Length of data.
void* const base_begin_; // Page-aligned base address.
const size_t base_size_; // Length of mapping.