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