< prev index next >

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

Print this page
*** 32,10 ***
--- 32,11 ---
  #include "gc/g1/heapRegionManager.hpp"
  #include "gc/shared/referenceProcessor.hpp"
  
  class G1CMBitMap;
  class G1FullCollector;
+ class SlidingForwarding;
  
  class G1FullGCPrepareTask : public G1FullGCTask {
  protected:
    volatile bool     _freed_regions;
    HeapRegionClaimer _hrclaimer;

*** 74,25 ***
      bool freed_regions();
    };
  
    class G1PrepareCompactLiveClosure : public StackObj {
      G1FullGCCompactionPoint* _cp;
  
    public:
      G1PrepareCompactLiveClosure(G1FullGCCompactionPoint* cp);
      size_t apply(oop object);
    };
  
    class G1RePrepareClosure : public StackObj {
      G1FullGCCompactionPoint* _cp;
      HeapRegion* _current;
  
    public:
      G1RePrepareClosure(G1FullGCCompactionPoint* hrcp,
                         HeapRegion* hr) :
          _cp(hrcp),
!         _current(hr) { }
  
      size_t apply(oop object);
    };
  };
  
--- 75,28 ---
      bool freed_regions();
    };
  
    class G1PrepareCompactLiveClosure : public StackObj {
      G1FullGCCompactionPoint* _cp;
+     SlidingForwarding* const _forwarding;
  
    public:
      G1PrepareCompactLiveClosure(G1FullGCCompactionPoint* cp);
      size_t apply(oop object);
    };
  
    class G1RePrepareClosure : public StackObj {
      G1FullGCCompactionPoint* _cp;
      HeapRegion* _current;
+     SlidingForwarding* const _forwarding;
  
    public:
      G1RePrepareClosure(G1FullGCCompactionPoint* hrcp,
                         HeapRegion* hr) :
          _cp(hrcp),
!         _current(hr),
+         _forwarding(G1CollectedHeap::heap()->forwarding()) { }
  
      size_t apply(oop object);
    };
  };
  
< prev index next >