< prev index next >

src/hotspot/share/gc/g1/g1RegionToSpaceMapper.hpp

8221260: Initialize more class members on construction, remove some unused ones
Reviewed-by:

83   // table entry corresponds to in the heap.                                                                               
84   static G1RegionToSpaceMapper* create_mapper(ReservedSpace rs,                                                            
85                                               size_t actual_size,                                                          
86                                               size_t page_size,                                                            
87                                               size_t region_granularity,                                                   
88                                               size_t byte_translation_factor,                                              
89                                               MemoryType type);                                                            
90 
91   static G1RegionToSpaceMapper* create_heap_mapper(ReservedSpace rs,                                                       
92                                                    size_t actual_size,                                                     
93                                                    size_t page_size,                                                       
94                                                    size_t region_granularity,                                              
95                                                    size_t byte_translation_factor,                                         
96                                                    MemoryType type);                                                       
97 };                                                                                                                         
98 
99 // G1RegionToSpaceMapper implementation where                                                                              
100 // part of space is mapped to dram and part to nv-dimm                                                                     
101 class G1RegionToHeteroSpaceMapper : public G1RegionToSpaceMapper {                                                         
102 private:                                                                                                                   
103   size_t _pages_per_region;                                                                                                
104   ReservedSpace _rs;                                                                                                       
105   G1RegionToSpaceMapper* _dram_mapper;                                                                                     
106   uint _num_committed_dram;                                                                                                
107   uint _num_committed_nvdimm;                                                                                              
108   uint _start_index_of_nvdimm;                                                                                             
109   uint _start_index_of_dram;                                                                                               
110   size_t _page_size;                                                                                                       
111   size_t _commit_factor;                                                                                                   
112   MemoryType _type;                                                                                                        
113 
114 public:                                                                                                                    
115   G1RegionToHeteroSpaceMapper(ReservedSpace rs, size_t used_size, size_t page_size, size_t region_granularity, size_t commi
116   bool initialize();                                                                                                       
117   uint num_committed_dram() const;                                                                                         
118   uint num_committed_nvdimm() const;                                                                                       
119 
120   virtual void commit_regions(uint start_idx, size_t num_regions = 1, WorkGang* pretouch_workers = NULL);                  
121   virtual void uncommit_regions(uint start_idx, size_t num_regions = 1);                                                   
122 };                                                                                                                         
123 #endif // SHARE_GC_G1_G1REGIONTOSPACEMAPPER_HPP                                                                            

83   // table entry corresponds to in the heap.
84   static G1RegionToSpaceMapper* create_mapper(ReservedSpace rs,
85                                               size_t actual_size,
86                                               size_t page_size,
87                                               size_t region_granularity,
88                                               size_t byte_translation_factor,
89                                               MemoryType type);
90 
91   static G1RegionToSpaceMapper* create_heap_mapper(ReservedSpace rs,
92                                                    size_t actual_size,
93                                                    size_t page_size,
94                                                    size_t region_granularity,
95                                                    size_t byte_translation_factor,
96                                                    MemoryType type);
97 };
98 
99 // G1RegionToSpaceMapper implementation where
100 // part of space is mapped to dram and part to nv-dimm
101 class G1RegionToHeteroSpaceMapper : public G1RegionToSpaceMapper {
102 private:

103   ReservedSpace _rs;
104   G1RegionToSpaceMapper* _dram_mapper;
105   uint _num_committed_dram;
106   uint _num_committed_nvdimm;

107   uint _start_index_of_dram;
108   size_t _page_size;
109   size_t _commit_factor;
110   MemoryType _type;
111 
112 public:
113   G1RegionToHeteroSpaceMapper(ReservedSpace rs, size_t used_size, size_t page_size, size_t region_granularity, size_t commi
114   bool initialize();
115   uint num_committed_dram() const;
116   uint num_committed_nvdimm() const;
117 
118   virtual void commit_regions(uint start_idx, size_t num_regions = 1, WorkGang* pretouch_workers = NULL);
119   virtual void uncommit_regions(uint start_idx, size_t num_regions = 1);
120 };
121 #endif // SHARE_GC_G1_G1REGIONTOSPACEMAPPER_HPP
< prev index next >