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