Add zygote space as its own space type.
Helps prevent errors caused from doing invalid operations on the
old alloc space.
Removed some duplicated code in mark_sweep.cc and semi_space.cc.
Change-Id: I67a772cab30d698744c918aad581053f282a4a99
diff --git a/runtime/gc/space/rosalloc_space.cc b/runtime/gc/space/rosalloc_space.cc
index e5993f6..177e38e 100644
--- a/runtime/gc/space/rosalloc_space.cc
+++ b/runtime/gc/space/rosalloc_space.cc
@@ -312,6 +312,7 @@
}
void RosAllocSpace::Clear() {
+ // TODO: Delete and create new mspace here.
madvise(GetMemMap()->Begin(), GetMemMap()->Size(), MADV_DONTNEED);
GetLiveBitmap()->Clear();
GetMarkBitmap()->Clear();