< prev index next >

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

Print this page
@@ -23,10 +23,11 @@
   */
  
  #include "precompiled.hpp"
  #include "gc/g1/g1FullGCCompactionPoint.hpp"
  #include "gc/g1/heapRegion.hpp"
+ #include "gc/shared/slidingForwarding.inline.hpp"
  #include "oops/oop.inline.hpp"
  #include "utilities/debug.hpp"
  
  G1FullGCCompactionPoint::G1FullGCCompactionPoint() :
      _current_region(NULL),

@@ -90,21 +91,21 @@
    // Get the next region and re-initialize the values.
    _current_region = next_region();
    initialize_values(true);
  }
  
- void G1FullGCCompactionPoint::forward(oop object, size_t size) {
+ void G1FullGCCompactionPoint::forward(SlidingForwarding* const forwarding, oop object, size_t size) {
    assert(_current_region != NULL, "Must have been initialized");
  
    // Ensure the object fit in the current region.
    while (!object_will_fit(size)) {
      switch_region();
    }
  
    // Store a forwarding pointer if the object should be moved.
    if (cast_from_oop<HeapWord*>(object) != _compaction_top) {
-     object->forward_to(cast_to_oop(_compaction_top));
+     forwarding->forward_to(object, cast_to_oop(_compaction_top));
      assert(object->is_forwarded(), "must be forwarded");
    } else {
      assert(!object->is_forwarded(), "must not be forwarded");
    }
  
< prev index next >