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