Revert "Revert "Add one LinearAlloc per ClassLoader""
Issue was fixed by:
https://android-review.googlesource.com/#/c/171945/
Bug: 22720414
This reverts commit 7de5dfe37f3cf24e1166412b589f6f67dcd1f1c0.
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc
index 60f833b..f561764 100644
--- a/runtime/gc/collector/mark_compact.cc
+++ b/runtime/gc/collector/mark_compact.cc
@@ -205,6 +205,7 @@
ReaderMutexLock mu(self, *Locks::heap_bitmap_lock_);
SweepSystemWeaks();
}
+ Runtime::Current()->GetClassLinker()->CleanupClassLoaders();
// Revoke buffers before measuring how many objects were moved since the TLABs need to be revoked
// before they are properly counted.
RevokeAllThreadLocalBuffers();