Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp

名前(function name)

void PSParallelCompact::update_deferred_objects(ParCompactionManager* cm,
                                                SpaceId id) {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(id < last_space_id, "bad space id");

  {- -------------------------------------------
  (1) 
      ---------------------------------------- -}

      ParallelCompactData& sd = summary_data();
      const SpaceInfo* const space_info = _space_info + id;
      ObjectStartArray* const start_array = space_info->start_array();

      const MutableSpace* const space = space_info->space();
      assert(space_info->dense_prefix() >= space->bottom(), "dense_prefix not set");
      HeapWord* const beg_addr = space_info->dense_prefix();
      HeapWord* const end_addr = sd.region_align_up(space_info->new_top());

      const RegionData* const beg_region = sd.addr_to_region_ptr(beg_addr);
      const RegionData* const end_region = sd.addr_to_region_ptr(end_addr);
      const RegionData* cur_region;
      for (cur_region = beg_region; cur_region < end_region; ++cur_region) {
        HeapWord* const addr = cur_region->deferred_obj_addr();
        if (addr != NULL) {
          if (start_array != NULL) {
            start_array->allocate_block(addr);
          }
          oop(addr)->update_contents(cm);
          assert(oop(addr)->is_oop_or_null(), "should be an oop now");
        }
      }
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.