< prev index next >

src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp

Print this page
*** 66,12 ***
      return size;
    }
  
    // copy object and reinit its mark
    HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj);
!   assert(obj_addr != destination, "everything in this pass should be moving");
!   Copy::aligned_conjoint_words(obj_addr, destination, size);
    cast_to_oop(destination)->init_mark();
    assert(cast_to_oop(destination)->klass() != NULL, "should have a class");
  
    return size;
  }
--- 66,13 ---
      return size;
    }
  
    // copy object and reinit its mark
    HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj);
!   assert(size <= INT_MAX, "sanity check");
!   assert(obj_addr != destination || size > (size_t)obj->compact_size((int)(uint)size), "everything in this pass should be moving or compressed in place");
+   obj->copy_conjoint_compact(destination); // TODO LOOM: see G1FullGCCompactionPoint::forward; Might want to reconsider compacting here.
    cast_to_oop(destination)->init_mark();
    assert(cast_to_oop(destination)->klass() != NULL, "should have a class");
  
    return size;
  }
< prev index next >