< prev index next >

src/hotspot/share/gc/shared/genCollectedHeap.cpp

Print this page
*** 50,10 ***
--- 50,11 ---
  #include "gc/shared/locationPrinter.inline.hpp"
  #include "gc/shared/oopStorage.inline.hpp"
  #include "gc/shared/oopStorageSet.inline.hpp"
  #include "gc/shared/oopStorageParState.inline.hpp"
  #include "gc/shared/scavengableNMethods.hpp"
+ #include "gc/shared/slidingForwarding.hpp"
  #include "gc/shared/space.hpp"
  #include "gc/shared/strongRootsScope.hpp"
  #include "gc/shared/weakProcessor.hpp"
  #include "gc/shared/workerThread.hpp"
  #include "memory/iterator.hpp"

*** 118,10 ***
--- 119,11 ---
        "Could not reserve enough space for object heap");
      return JNI_ENOMEM;
    }
  
    initialize_reserved_region(heap_rs);
+   _forwarding = new SlidingForwarding(_reserved);
  
    _rem_set = create_rem_set(heap_rs.region());
    _rem_set->initialize();
    CardTableBarrierSet *bs = new CardTableBarrierSet(_rem_set);
    bs->initialize();

*** 1084,10 ***
--- 1086,11 ---
  
  #if INCLUDE_SERIALGC
  void GenCollectedHeap::prepare_for_compaction() {
    // Start by compacting into same gen.
    CompactPoint cp(_old_gen);
+   _forwarding->clear();
    _old_gen->prepare_for_compaction(&cp);
    _young_gen->prepare_for_compaction(&cp);
  }
  #endif // INCLUDE_SERIALGC
  
< prev index next >