< prev index next >

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

Print this page
rev 48001 : [mq]: 8191564-new.patch


  27 #include "gc/shared/blockOffsetTable.inline.hpp"
  28 #include "gc/shared/cardTableRS.hpp"
  29 #include "gc/shared/collectedHeap.inline.hpp"
  30 #include "gc/shared/gcLocker.inline.hpp"
  31 #include "gc/shared/gcTimer.hpp"
  32 #include "gc/shared/gcTrace.hpp"
  33 #include "gc/shared/genCollectedHeap.hpp"
  34 #include "gc/shared/genOopClosures.hpp"
  35 #include "gc/shared/genOopClosures.inline.hpp"
  36 #include "gc/shared/generation.hpp"
  37 #include "gc/shared/space.inline.hpp"
  38 #include "gc/shared/spaceDecorator.hpp"
  39 #include "logging/log.hpp"
  40 #include "memory/allocation.inline.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "runtime/java.hpp"
  43 #include "utilities/copy.hpp"
  44 #include "utilities/events.hpp"
  45 
  46 Generation::Generation(ReservedSpace rs, size_t initial_size) :
  47   _ref_processor(NULL) {

  48   if (!_virtual_space.initialize(rs, initial_size)) {
  49     vm_exit_during_initialization("Could not reserve enough space for "
  50                     "object heap");
  51   }
  52   // Mangle all of the the initial generation.
  53   if (ZapUnusedHeapArea) {
  54     MemRegion mangle_region((HeapWord*)_virtual_space.low(),
  55       (HeapWord*)_virtual_space.high());
  56     SpaceMangler::mangle_region(mangle_region);
  57   }
  58   _reserved = MemRegion((HeapWord*)_virtual_space.low_boundary(),
  59           (HeapWord*)_virtual_space.high_boundary());
  60 }
  61 
  62 size_t Generation::initial_size() {
  63   GenCollectedHeap* gch = GenCollectedHeap::heap();
  64   if (gch->is_young_gen(this)) {
  65     return gch->gen_policy()->young_gen_spec()->init_size();
  66   }
  67   return gch->gen_policy()->old_gen_spec()->init_size();




  27 #include "gc/shared/blockOffsetTable.inline.hpp"
  28 #include "gc/shared/cardTableRS.hpp"
  29 #include "gc/shared/collectedHeap.inline.hpp"
  30 #include "gc/shared/gcLocker.inline.hpp"
  31 #include "gc/shared/gcTimer.hpp"
  32 #include "gc/shared/gcTrace.hpp"
  33 #include "gc/shared/genCollectedHeap.hpp"
  34 #include "gc/shared/genOopClosures.hpp"
  35 #include "gc/shared/genOopClosures.inline.hpp"
  36 #include "gc/shared/generation.hpp"
  37 #include "gc/shared/space.inline.hpp"
  38 #include "gc/shared/spaceDecorator.hpp"
  39 #include "logging/log.hpp"
  40 #include "memory/allocation.inline.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "runtime/java.hpp"
  43 #include "utilities/copy.hpp"
  44 #include "utilities/events.hpp"
  45 
  46 Generation::Generation(ReservedSpace rs, size_t initial_size) :
  47   _ref_processor(NULL),
  48   _gc_manager(NULL) {
  49   if (!_virtual_space.initialize(rs, initial_size)) {
  50     vm_exit_during_initialization("Could not reserve enough space for "
  51                     "object heap");
  52   }
  53   // Mangle all of the the initial generation.
  54   if (ZapUnusedHeapArea) {
  55     MemRegion mangle_region((HeapWord*)_virtual_space.low(),
  56       (HeapWord*)_virtual_space.high());
  57     SpaceMangler::mangle_region(mangle_region);
  58   }
  59   _reserved = MemRegion((HeapWord*)_virtual_space.low_boundary(),
  60           (HeapWord*)_virtual_space.high_boundary());
  61 }
  62 
  63 size_t Generation::initial_size() {
  64   GenCollectedHeap* gch = GenCollectedHeap::heap();
  65   if (gch->is_young_gen(this)) {
  66     return gch->gen_policy()->young_gen_spec()->init_size();
  67   }
  68   return gch->gen_policy()->old_gen_spec()->init_size();


< prev index next >