2169 HeapRegion* dummy_region = new_heap_region(0 /* index of bottom region */, 2170 _g1_reserved.start()); 2171 // We'll re-use the same region whether the alloc region will 2172 // require BOT updates or not and, if it doesn't, then a non-young 2173 // region will complain that it cannot support allocations without 2174 // BOT updates. So we'll tag the dummy region as young to avoid that. 2175 dummy_region->set_young(); 2176 // Make sure it's full. 2177 dummy_region->set_top(dummy_region->end()); 2178 G1AllocRegion::setup(this, dummy_region); 2179 2180 init_mutator_alloc_region(); 2181 2182 // Do create of the monitoring and management support so that 2183 // values in the heap have been properly initialized. 2184 _g1mm = new G1MonitoringSupport(this); 2185 2186 return JNI_OK; 2187 } 2188 2189 size_t G1CollectedHeap::conservative_max_heap_alignment() { 2190 return HeapRegion::max_region_size(); 2191 } 2192 2193 void G1CollectedHeap::ref_processing_init() { 2194 // Reference processing in G1 currently works as follows: 2195 // 2196 // * There are two reference processor instances. One is 2197 // used to record and process discovered references 2198 // during concurrent marking; the other is used to 2199 // record and process references during STW pauses 2200 // (both full and incremental). 2201 // * Both ref processors need to 'span' the entire heap as 2202 // the regions in the collection set may be dotted around. 2203 // 2204 // * For the concurrent marking ref processor: 2205 // * Reference discovery is enabled at initial marking. 2206 // * Reference discovery is disabled and the discovered 2207 // references processed etc during remarking. 2208 // * Reference discovery is MT (see below). 2209 // * Reference discovery requires a barrier (see below). 2210 // * Reference processing may or may not be MT 2211 // (depending on the value of ParallelRefProcEnabled 2212 // and ParallelGCThreads). | 2169 HeapRegion* dummy_region = new_heap_region(0 /* index of bottom region */, 2170 _g1_reserved.start()); 2171 // We'll re-use the same region whether the alloc region will 2172 // require BOT updates or not and, if it doesn't, then a non-young 2173 // region will complain that it cannot support allocations without 2174 // BOT updates. So we'll tag the dummy region as young to avoid that. 2175 dummy_region->set_young(); 2176 // Make sure it's full. 2177 dummy_region->set_top(dummy_region->end()); 2178 G1AllocRegion::setup(this, dummy_region); 2179 2180 init_mutator_alloc_region(); 2181 2182 // Do create of the monitoring and management support so that 2183 // values in the heap have been properly initialized. 2184 _g1mm = new G1MonitoringSupport(this); 2185 2186 return JNI_OK; 2187 } 2188 2189 void G1CollectedHeap::ref_processing_init() { 2190 // Reference processing in G1 currently works as follows: 2191 // 2192 // * There are two reference processor instances. One is 2193 // used to record and process discovered references 2194 // during concurrent marking; the other is used to 2195 // record and process references during STW pauses 2196 // (both full and incremental). 2197 // * Both ref processors need to 'span' the entire heap as 2198 // the regions in the collection set may be dotted around. 2199 // 2200 // * For the concurrent marking ref processor: 2201 // * Reference discovery is enabled at initial marking. 2202 // * Reference discovery is disabled and the discovered 2203 // references processed etc during remarking. 2204 // * Reference discovery is MT (see below). 2205 // * Reference discovery requires a barrier (see below). 2206 // * Reference processing may or may not be MT 2207 // (depending on the value of ParallelRefProcEnabled 2208 // and ParallelGCThreads). |