Mark non-image spaces and use write barrier for image spaces.
Don't mark string and class roots that are in the image, alloc space
references will be caught by the write barrier.
Change-Id: Idcf9e4ede3b83556d4f8a01276273726dc6eea46
diff --git a/src/class_linker.h b/src/class_linker.h
index e2c5921..a972b3b 100644
--- a/src/class_linker.h
+++ b/src/class_linker.h
@@ -306,7 +306,7 @@
// Inserts a class into the class table. Returns true if the class
// was inserted.
- bool InsertClass(const std::string& descriptor, Class* klass);
+ bool InsertClass(const std::string& descriptor, Class* klass, bool image_class);
void RegisterDexFileLocked(const DexFile& dex_file, SirtRef<DexCache>& dex_cache);
bool IsDexFileRegisteredLocked(const DexFile& dex_file) const;
@@ -371,6 +371,7 @@
// Class::descriptor_ and Class::class_loader_.
// Protected by classes_lock_
typedef std::tr1::unordered_multimap<size_t, Class*> Table;
+ Table image_classes_;
Table classes_;
mutable Mutex classes_lock_;