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/native/dalvik_system_Zygote.cc b/src/native/dalvik_system_Zygote.cc
index 3323a23..4fb8397 100644
--- a/src/native/dalvik_system_Zygote.cc
+++ b/src/native/dalvik_system_Zygote.cc
@@ -295,7 +295,7 @@
jstring java_se_info, jstring java_se_name, bool is_system_server) {
Runtime* runtime = Runtime::Current();
CHECK(runtime->IsZygote()) << "runtime instance not started with -Xzygote";
- if (false) { // TODO: do we need do anything special like !dvmGcPreZygoteFork()?
+ if (!runtime->PreZygoteFork()) {
LOG(FATAL) << "pre-fork heap failed";
}