< prev index next >

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

Print this page
rev 58017 : [mq]: 8238854-remove-superfluous-alloc-checks


  71 
  72   MemRegion cmr((HeapWord*)virtual_space()->low(),
  73                 (HeapWord*)virtual_space()->high());
  74   ParallelScavengeHeap::heap()->card_table()->resize_covered_region(cmr);
  75 
  76   if (ZapUnusedHeapArea) {
  77     // Mangle newly committed space immediately because it
  78     // can be done here more simply that after the new
  79     // spaces have been computed.
  80     SpaceMangler::mangle_region(cmr);
  81   }
  82 
  83   if (UseNUMA) {
  84     _eden_space = new MutableNUMASpace(virtual_space()->alignment());
  85   } else {
  86     _eden_space = new MutableSpace(virtual_space()->alignment());
  87   }
  88   _from_space = new MutableSpace(virtual_space()->alignment());
  89   _to_space   = new MutableSpace(virtual_space()->alignment());
  90 
  91   if (_eden_space == NULL || _from_space == NULL || _to_space == NULL) {
  92     vm_exit_during_initialization("Could not allocate a young gen space");
  93   }
  94 
  95   // Generation Counters - generation 0, 3 subspaces
  96   _gen_counters = new PSGenerationCounters("new", 0, 3, _min_gen_size,
  97                                            _max_gen_size, _virtual_space);
  98 
  99   // Compute maximum space sizes for performance counters
 100   size_t alignment = SpaceAlignment;
 101   size_t size = virtual_space()->reserved_size();
 102 
 103   size_t max_survivor_size;
 104   size_t max_eden_size;
 105 
 106   if (UseAdaptiveSizePolicy) {
 107     max_survivor_size = size / MinSurvivorRatio;
 108 
 109     // round the survivor space size down to the nearest alignment
 110     // and make sure its size is greater than 0.
 111     max_survivor_size = align_down(max_survivor_size, alignment);
 112     max_survivor_size = MAX2(max_survivor_size, alignment);
 113 
 114     // set the maximum size of eden to be the size of the young gen




  71 
  72   MemRegion cmr((HeapWord*)virtual_space()->low(),
  73                 (HeapWord*)virtual_space()->high());
  74   ParallelScavengeHeap::heap()->card_table()->resize_covered_region(cmr);
  75 
  76   if (ZapUnusedHeapArea) {
  77     // Mangle newly committed space immediately because it
  78     // can be done here more simply that after the new
  79     // spaces have been computed.
  80     SpaceMangler::mangle_region(cmr);
  81   }
  82 
  83   if (UseNUMA) {
  84     _eden_space = new MutableNUMASpace(virtual_space()->alignment());
  85   } else {
  86     _eden_space = new MutableSpace(virtual_space()->alignment());
  87   }
  88   _from_space = new MutableSpace(virtual_space()->alignment());
  89   _to_space   = new MutableSpace(virtual_space()->alignment());
  90 




  91   // Generation Counters - generation 0, 3 subspaces
  92   _gen_counters = new PSGenerationCounters("new", 0, 3, _min_gen_size,
  93                                            _max_gen_size, _virtual_space);
  94 
  95   // Compute maximum space sizes for performance counters
  96   size_t alignment = SpaceAlignment;
  97   size_t size = virtual_space()->reserved_size();
  98 
  99   size_t max_survivor_size;
 100   size_t max_eden_size;
 101 
 102   if (UseAdaptiveSizePolicy) {
 103     max_survivor_size = size / MinSurvivorRatio;
 104 
 105     // round the survivor space size down to the nearest alignment
 106     // and make sure its size is greater than 0.
 107     max_survivor_size = align_down(max_survivor_size, alignment);
 108     max_survivor_size = MAX2(max_survivor_size, alignment);
 109 
 110     // set the maximum size of eden to be the size of the young gen


< prev index next >