< prev index next >

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

Print this page
@@ -31,10 +31,11 @@
  #include "gc/g1/heapRegionManager.hpp"
  #include "gc/shared/referenceProcessor.hpp"
  
  class G1CollectedHeap;
  class G1CMBitMap;
+ class SlidingForwarding;
  
  class G1FullGCCompactTask : public G1FullGCTask {
  protected:
    HeapRegionClaimer _claimer;
  

@@ -48,13 +49,15 @@
    void work(uint worker_id);
    void serial_compaction();
  
    class G1CompactRegionClosure : public StackObj {
      G1CMBitMap* _bitmap;
- 
+     const SlidingForwarding* const _forwarding;
    public:
-     G1CompactRegionClosure(G1CMBitMap* bitmap) : _bitmap(bitmap) { }
+     G1CompactRegionClosure(G1CMBitMap* bitmap) :
+       _bitmap(bitmap),
+       _forwarding(G1CollectedHeap::heap()->forwarding()) { }
      size_t apply(oop object);
    };
  };
  
  #endif // SHARE_GC_G1_G1FULLGCCOMPACTTASK_HPP
< prev index next >