< prev index next >

src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp

Print this page
rev 52626 : webrev.03
rev 52628 : changes for full GC


  75                        heap_rs.size());
  76 
  77   initialize_reserved_region((HeapWord*)heap_rs.base(), (HeapWord*)(heap_rs.base() + heap_rs.size()));
  78 
  79   PSCardTable* card_table = new PSCardTable(reserved_region());
  80   card_table->initialize();
  81   CardTableBarrierSet* const barrier_set = new CardTableBarrierSet(card_table);
  82   barrier_set->initialize();
  83   BarrierSet::set_barrier_set(barrier_set);
  84 
  85   // Make up the generations
  86   // Calculate the maximum size that a generation can grow.  This
  87   // includes growth into the other generation.  Note that the
  88   // parameter _max_gen_size is kept as the maximum
  89   // size of the generation as the boundaries currently stand.
  90   // _max_gen_size is still used as that value.
  91   double max_gc_pause_sec = ((double) MaxGCPauseMillis)/1000.0;
  92   double max_gc_minor_pause_sec = ((double) MaxGCMinorPauseMillis)/1000.0;
  93 
  94   if (AllocateOldGenAt != NULL && UseAdaptiveGCBoundary) {

  95     _gens = new AdjoiningGenerationsForHeteroHeap(heap_rs, _collector_policy->max_heap_byte_size() /* total_size_limit */,
  96                                                   _collector_policy, generation_alignment());
  97   }
  98   else {
  99     _gens = new AdjoiningGenerations(heap_rs, _collector_policy, generation_alignment());
 100   }
 101 
 102   _old_gen = _gens->old_gen();
 103   _young_gen = _gens->young_gen();
 104 
 105   const size_t eden_capacity = _young_gen->eden_space()->capacity_in_bytes();
 106   const size_t old_capacity = _old_gen->capacity_in_bytes();
 107   const size_t initial_promo_size = MIN2(eden_capacity, old_capacity);
 108   _size_policy =
 109     new PSAdaptiveSizePolicy(eden_capacity,
 110                              initial_promo_size,
 111                              young_gen()->to_space()->capacity_in_bytes(),
 112                              _collector_policy->gen_alignment(),
 113                              max_gc_pause_sec,
 114                              max_gc_minor_pause_sec,




  75                        heap_rs.size());
  76 
  77   initialize_reserved_region((HeapWord*)heap_rs.base(), (HeapWord*)(heap_rs.base() + heap_rs.size()));
  78 
  79   PSCardTable* card_table = new PSCardTable(reserved_region());
  80   card_table->initialize();
  81   CardTableBarrierSet* const barrier_set = new CardTableBarrierSet(card_table);
  82   barrier_set->initialize();
  83   BarrierSet::set_barrier_set(barrier_set);
  84 
  85   // Make up the generations
  86   // Calculate the maximum size that a generation can grow.  This
  87   // includes growth into the other generation.  Note that the
  88   // parameter _max_gen_size is kept as the maximum
  89   // size of the generation as the boundaries currently stand.
  90   // _max_gen_size is still used as that value.
  91   double max_gc_pause_sec = ((double) MaxGCPauseMillis)/1000.0;
  92   double max_gc_minor_pause_sec = ((double) MaxGCMinorPauseMillis)/1000.0;
  93 
  94   if (AllocateOldGenAt != NULL && UseAdaptiveGCBoundary) {
  95     _is_hetero_heap = true;
  96     _gens = new AdjoiningGenerationsForHeteroHeap(heap_rs, _collector_policy->max_heap_byte_size() /* total_size_limit */,
  97                                                   _collector_policy, generation_alignment());
  98   }
  99   else {
 100     _gens = new AdjoiningGenerations(heap_rs, _collector_policy, generation_alignment());
 101   }
 102 
 103   _old_gen = _gens->old_gen();
 104   _young_gen = _gens->young_gen();
 105 
 106   const size_t eden_capacity = _young_gen->eden_space()->capacity_in_bytes();
 107   const size_t old_capacity = _old_gen->capacity_in_bytes();
 108   const size_t initial_promo_size = MIN2(eden_capacity, old_capacity);
 109   _size_policy =
 110     new PSAdaptiveSizePolicy(eden_capacity,
 111                              initial_promo_size,
 112                              young_gen()->to_space()->capacity_in_bytes(),
 113                              _collector_policy->gen_alignment(),
 114                              max_gc_pause_sec,
 115                              max_gc_minor_pause_sec,


< prev index next >