< prev index next >

src/hotspot/share/gc/g1/heapRegionManager.cpp

Print this page
rev 53924 : imported patch 8219747-remove-g1-prefix
rev 53925 : imported patch 8219747-shade-review
rev 53927 : [mq]: 8219856-spell-out-hetero


  52     }
  53   }
  54   bool is_correct_type(HeapRegion* hr) { return hr->is_free(); }
  55   const char* get_description() { return "Free Regions"; }
  56 };
  57 
  58 HeapRegionManager::HeapRegionManager() :
  59   _bot_mapper(NULL),
  60   _cardtable_mapper(NULL),
  61   _card_counts_mapper(NULL),
  62   _available_map(mtGC),
  63   _num_committed(0),
  64   _allocated_heapregions_length(0),
  65   _regions(), _heap_mapper(NULL),
  66   _prev_bitmap_mapper(NULL),
  67   _next_bitmap_mapper(NULL),
  68   _free_list("Free list", new MasterFreeRegionListChecker())
  69 { }
  70 
  71 HeapRegionManager* HeapRegionManager::create_manager(G1CollectedHeap* heap, G1CollectorPolicy* policy) {
  72   if (policy->is_hetero_heap()) {
  73     return new HeterogeneousHeapRegionManager((uint)(policy->max_heap_byte_size() / HeapRegion::GrainBytes) /*heap size as num of regions*/);
  74   }
  75   return new HeapRegionManager();
  76 }
  77 
  78 void HeapRegionManager::initialize(G1RegionToSpaceMapper* heap_storage,
  79                                G1RegionToSpaceMapper* prev_bitmap,
  80                                G1RegionToSpaceMapper* next_bitmap,
  81                                G1RegionToSpaceMapper* bot,
  82                                G1RegionToSpaceMapper* cardtable,
  83                                G1RegionToSpaceMapper* card_counts) {
  84   _allocated_heapregions_length = 0;
  85 
  86   _heap_mapper = heap_storage;
  87 
  88   _prev_bitmap_mapper = prev_bitmap;
  89   _next_bitmap_mapper = next_bitmap;
  90 
  91   _bot_mapper = bot;
  92   _cardtable_mapper = cardtable;




  52     }
  53   }
  54   bool is_correct_type(HeapRegion* hr) { return hr->is_free(); }
  55   const char* get_description() { return "Free Regions"; }
  56 };
  57 
  58 HeapRegionManager::HeapRegionManager() :
  59   _bot_mapper(NULL),
  60   _cardtable_mapper(NULL),
  61   _card_counts_mapper(NULL),
  62   _available_map(mtGC),
  63   _num_committed(0),
  64   _allocated_heapregions_length(0),
  65   _regions(), _heap_mapper(NULL),
  66   _prev_bitmap_mapper(NULL),
  67   _next_bitmap_mapper(NULL),
  68   _free_list("Free list", new MasterFreeRegionListChecker())
  69 { }
  70 
  71 HeapRegionManager* HeapRegionManager::create_manager(G1CollectedHeap* heap, G1CollectorPolicy* policy) {
  72   if (policy->is_heterogeneous_heap()) {
  73     return new HeterogeneousHeapRegionManager((uint)(policy->max_heap_byte_size() / HeapRegion::GrainBytes) /*heap size as num of regions*/);
  74   }
  75   return new HeapRegionManager();
  76 }
  77 
  78 void HeapRegionManager::initialize(G1RegionToSpaceMapper* heap_storage,
  79                                G1RegionToSpaceMapper* prev_bitmap,
  80                                G1RegionToSpaceMapper* next_bitmap,
  81                                G1RegionToSpaceMapper* bot,
  82                                G1RegionToSpaceMapper* cardtable,
  83                                G1RegionToSpaceMapper* card_counts) {
  84   _allocated_heapregions_length = 0;
  85 
  86   _heap_mapper = heap_storage;
  87 
  88   _prev_bitmap_mapper = prev_bitmap;
  89   _next_bitmap_mapper = next_bitmap;
  90 
  91   _bot_mapper = bot;
  92   _cardtable_mapper = cardtable;


< prev index next >