271 }
272
273 void HeapRegion::clear_humongous() {
274 assert(is_humongous(), "pre-condition");
275
276 assert(capacity() == HeapRegion::GrainBytes, "pre-condition");
277 _humongous_start_region = NULL;
278 }
279
280 HeapRegion::HeapRegion(uint hrm_index,
281 G1BlockOffsetTable* bot,
282 MemRegion mr) :
283 G1ContiguousSpace(bot),
284 _hrm_index(hrm_index),
285 _allocation_context(AllocationContext::system()),
286 _humongous_start_region(NULL),
287 _next_in_special_set(NULL),
288 _evacuation_failed(false),
289 _prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0),
290 _next_young_region(NULL),
291 _next_dirty_cards_region(NULL), _next(NULL), _prev(NULL),
292 #ifdef ASSERT
293 _containing_set(NULL),
294 #endif // ASSERT
295 _young_index_in_cset(-1), _surv_rate_group(NULL), _age_index(-1),
296 _rem_set(NULL), _recorded_rs_length(0), _predicted_elapsed_time_ms(0),
297 _predicted_bytes_to_copy(0)
298 {
299 _rem_set = new HeapRegionRemSet(bot, this);
300
301 initialize(mr);
302 }
303
304 void HeapRegion::initialize(MemRegion mr, bool clear_space, bool mangle_space) {
305 assert(_rem_set->is_empty(), "Remembered set must be empty");
306
307 G1ContiguousSpace::initialize(mr, clear_space, mangle_space);
308
309 hr_clear(false /*par*/, false /*clear_space*/);
310 set_top(bottom());
311 record_timestamp();
|
271 }
272
273 void HeapRegion::clear_humongous() {
274 assert(is_humongous(), "pre-condition");
275
276 assert(capacity() == HeapRegion::GrainBytes, "pre-condition");
277 _humongous_start_region = NULL;
278 }
279
280 HeapRegion::HeapRegion(uint hrm_index,
281 G1BlockOffsetTable* bot,
282 MemRegion mr) :
283 G1ContiguousSpace(bot),
284 _hrm_index(hrm_index),
285 _allocation_context(AllocationContext::system()),
286 _humongous_start_region(NULL),
287 _next_in_special_set(NULL),
288 _evacuation_failed(false),
289 _prev_marked_bytes(0), _next_marked_bytes(0), _gc_efficiency(0.0),
290 _next_young_region(NULL),
291 _next(NULL), _prev(NULL),
292 #ifdef ASSERT
293 _containing_set(NULL),
294 #endif // ASSERT
295 _young_index_in_cset(-1), _surv_rate_group(NULL), _age_index(-1),
296 _rem_set(NULL), _recorded_rs_length(0), _predicted_elapsed_time_ms(0),
297 _predicted_bytes_to_copy(0)
298 {
299 _rem_set = new HeapRegionRemSet(bot, this);
300
301 initialize(mr);
302 }
303
304 void HeapRegion::initialize(MemRegion mr, bool clear_space, bool mangle_space) {
305 assert(_rem_set->is_empty(), "Remembered set must be empty");
306
307 G1ContiguousSpace::initialize(mr, clear_space, mangle_space);
308
309 hr_clear(false /*par*/, false /*clear_space*/);
310 set_top(bottom());
311 record_timestamp();
|