コード例 #1
0
 void ProcessMyGrayObjects(ref ThreadHeaderQueue.LocalList workList)
 {
     if (amMarkingForCoCo)
     {
         ProcessObjectsSlow(ref workList);
     }
     else
     {
         // hand-inlined from ConcurrentMSCollector.  needed
         // to ensure that the VisitReferenceFields call gets
         // inlined.
         while (!ConcurrentMSCollector.killCollectorThreads &&
                !workList.IsEmpty())
         {
             // Pop the next value
             Object obj = workList.Pop(markedColor);
             if (CoCoBarrier.fVerifyToSpaceMark &&
                 !CoCoBarrier.instance.IsInToSpace(Magic.addressOf(obj)))
             {
                 VTable.DebugBreak();
             }
             // Visit Fields
             this.VisitReferenceFields(obj);
         }
     }
 }
コード例 #2
0
 //[NoBarriers]
 void ProcessObjectsSlow(ref ThreadHeaderQueue.LocalList workList)
 {
     while (!ConcurrentMSCollector.killCollectorThreads &&
            !workList.IsEmpty())
     {
         // Pop the next value
         Object obj = workList.Pop(markedColor);
         if (fVerbose)
         {
             VTable.DebugPrint("cms popped: ");
             VTable.DebugPrint((ulong)Magic.addressOf(obj));
             VTable.DebugPrint("\n");
         }
         // let CoCo do some stuff
         ScanHook(obj);
         // Visit Fields
         this.VisitReferenceFields(obj);
     }
 }