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/thread.cc b/src/thread.cc
index 4f47d22..983486a 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -63,6 +63,10 @@
static Method* gThreadGroup_removeThread = NULL;
static Method* gUncaughtExceptionHandler_uncaughtException = NULL;
+void Thread::InitCardTable() {
+ card_table_ = Heap::GetCardTable()->GetBiasedBase();
+}
+
void Thread::InitFunctionPointers() {
#if defined(__arm__)
pShlLong = art_shl_long;
@@ -244,6 +248,7 @@
void Thread::Attach(const Runtime* runtime) {
InitCpu();
InitFunctionPointers();
+ InitCardTable();
thin_lock_id_ = Runtime::Current()->GetThreadList()->AllocThreadId();