Example #1
0
      bool mark_address(immix::Address addr, immix::MarkStack& ms) {
        Object* obj = addr.as<Object>();

        if(obj->marked_p()) return false;
        obj->mark(gc_->which_mark());
        gc_->inc_marked_objects();

        ms.push_back(addr);
        if(obj->in_immix_p()) return true;

        // If this is a young object, let the GC know not to try and mark
        // the block it's in.
        return false;
      }
Example #2
0
      bool mark_address(immix::Address addr, immix::MarkStack& ms) {
        Object* obj = addr.as<Object>();

        if(obj->marked_p()) {
          if(obj->marked_p(gc_->which_mark())) return false;
          assert(0 && "invalid mark detectet!\n");
        }
        obj->mark(gc_->which_mark());

        ms.push_back(addr);

        // If this is a young object, let the GC know not to try and mark
        // the block it's in.
        if(obj->young_object_p() || !obj->in_immix_p()) {
          return false;
        }
        return true;
      }
Example #3
0
        /**
         * Called when the immix::GC object wishes to mark an object.
         *
         * @returns true if the object is not already marked, and in the Immix
         * space; otherwise false.
         */
        inline bool mark_address(memory::Address addr, immix::MarkStack& ms, bool push = true) {
            Object* obj = addr.as<Object>();

            if(obj->marked_p(object_memory_->mark())) return false;
            obj->mark(object_memory_, object_memory_->mark());
            gc_->inc_marked_objects();

            if(push) ms.push_back(addr);
            // If this is a young object, let the GC know not to try and mark
            // the block it's in.
            return obj->in_immix_p();
        }
Example #4
0
 void walk_pointers(memory::Address addr, immix::Marker<ObjectDescriber>& mark) {
   Object* obj = addr.as<Object>();
   if(obj) gc_->scan_object(obj);
 }
Example #5
0
 void walk_pointers(immix::Address addr, immix::Marker<ObjectDescriber>& mark) {
   gc_->scan_object(addr.as<Object>());
 }