Ejemplo n.º 1
0
 void do_object(oop obj) {
   if (obj->is_shared()) {
     return;
   }
   if (obj->is_gc_marked() && obj->forwardee() == NULL) {
     int s = obj->size();
     oop sh_obj = (oop)_space->allocate(s);
     if (sh_obj == NULL) {
       if (_read_only) {
         warning("\nThe permanent generation read only space is not large "
                 "enough to \npreload requested classes.  Use "
                 "-XX:SharedReadOnlySize= to increase \nthe initial "
                 "size of the read only space.\n");
       } else {
         warning("\nThe permanent generation read write space is not large "
                 "enough to \npreload requested classes.  Use "
                 "-XX:SharedReadWriteSize= to increase \nthe initial "
                 "size of the read write space.\n");
       }
       exit(2);
     }
     if (PrintSharedSpaces && Verbose && WizardMode) {
       tty->print_cr("\nMoveMarkedObjects: " PTR_FORMAT " -> " PTR_FORMAT " %s", obj, sh_obj,
                     (_read_only ? "ro" : "rw"));
     }
     Copy::aligned_disjoint_words((HeapWord*)obj, (HeapWord*)sh_obj, s);
     obj->forward_to(sh_obj);
     if (_read_only) {
       // Readonly objects: set hash value to self pointer and make gc_marked.
       sh_obj->forward_to(sh_obj);
     } else {
       sh_obj->init_mark();
     }
   }
 }
Ejemplo n.º 2
0
static bool mark_object(oop obj) {
  if (obj != NULL &&
      !obj->is_shared() &&
      !obj->is_forwarded() &&
      !obj->is_gc_marked()) {
    obj->set_mark(markOopDesc::prototype()->set_marked());
    return true;
  }

  return false;
}
Ejemplo n.º 3
0
bool MarkSweep::IsAliveClosure::do_object_b(oop p) { return p->is_gc_marked(); }
Ejemplo n.º 4
0
inline void MarkSweep::follow_object(oop obj) {
  assert(obj->is_gc_marked(), "should be marked");

  obj->ms_follow_contents();
}