stack-access2
author Benjamin Smedberg <benjamin@smedbergs.us>
Sun, 20 Apr 2008 21:43:09 -0400
changeset 42 53c5098cb79e0223016b6901194a89d913f235fb
parent 40 432248c58b48b7a0d9123594d5d2690fa20933c4
permissions -rw-r--r--
Updates and imports

diff --git a/MMgc/GC.cpp b/MMgc/GC.cpp
--- a/MMgc/GC.cpp
+++ b/MMgc/GC.cpp
@@ -2340,12 +2340,16 @@
 #ifdef GCHEAP_LOCK
 			GCAcquireSpinlock lock(m_rootListLock);
 #endif
+			m_currentQueue = &m_incrementalWork;
+
 			GCRoot *r = m_roots;
 			while(r) {
 				GCWorkItem item = r->GetWorkItem();
 				MarkItem(item, m_incrementalWork);
 				r = r->next;
 			}
+
+			m_currentQueue = NULL;
 		}
 		markTicks += GetPerformanceCounter() - start;
 		IncrementalMark();
@@ -2775,6 +2779,8 @@
 		// finished in Sweep
 		sweepStart = GetPerformanceCounter();
 		
+		m_currentQueue = &m_incrementalWork;
+
 		// mark roots again, could have changed (alternative is to put WB's on the roots
 		// which we may need to do if we find FinishIncrementalMark taking too long)
 		
@@ -2801,6 +2807,8 @@
 		}
 
 		MarkQueueAndStack(m_incrementalWork);
+
+		m_currentQueue = NULL;
 
 #ifdef _DEBUG
 		// need to traverse all marked objects and make sure they don't contain