예제 #1
0
/// Set the peer state to a non-initial state (any state but Uninitialized)
void RegistrarPeer::setState(SynchronizationState state)
{
   switch(state)
   {
   case Uninitialized:
      assert(false);
      break;

   case Reachable:
      markReachable();
      break;

   case UnReachable:
      markUnReachable();
      break;

   case Incompatible:
      markIncompatible();
      break;

   default:
     assert(false);
      break;
   }
}
예제 #2
0
파일: GC.cpp 프로젝트: diocles/gnash
void 
GC::runCycle()
{
    //
    // Collection cycle
    //

#ifdef GNASH_GC_DEBUG 
    ++_collectorRuns;
#endif

#ifdef GNASH_GC_DEBUG 
    log_debug(_("GC: collection cycle started - %d/%d new resources "
            "allocated since last run (from %d to %d)"),
            _resListSize - _lastResCount, _maxNewCollectablesCount,
            _lastResCount, _resListSize);
#endif // GNASH_GC_DEBUG

    // Mark all resources as reachable
    markReachable();

    // clean unreachable resources, and mark the others as reachable again
    cleanUnreachable();

    _lastResCount = _resListSize;

}