29 _level(level), |
29 _level(level), |
30 _ref_processor(NULL) { |
30 _ref_processor(NULL) { |
31 if (!_virtual_space.initialize(rs, initial_size)) { |
31 if (!_virtual_space.initialize(rs, initial_size)) { |
32 vm_exit_during_initialization("Could not reserve enough space for " |
32 vm_exit_during_initialization("Could not reserve enough space for " |
33 "object heap"); |
33 "object heap"); |
|
34 } |
|
35 // Mangle all of the the initial generation. |
|
36 if (ZapUnusedHeapArea) { |
|
37 MemRegion mangle_region((HeapWord*)_virtual_space.low(), |
|
38 (HeapWord*)_virtual_space.high()); |
|
39 SpaceMangler::mangle_region(mangle_region); |
34 } |
40 } |
35 _reserved = MemRegion((HeapWord*)_virtual_space.low_boundary(), |
41 _reserved = MemRegion((HeapWord*)_virtual_space.low_boundary(), |
36 (HeapWord*)_virtual_space.high_boundary()); |
42 (HeapWord*)_virtual_space.high_boundary()); |
37 } |
43 } |
38 |
44 |
503 Universe::heap()->barrier_set()->resize_covered_region(mr); |
509 Universe::heap()->barrier_set()->resize_covered_region(mr); |
504 // Expand shared block offset array |
510 // Expand shared block offset array |
505 _bts->resize(new_word_size); |
511 _bts->resize(new_word_size); |
506 |
512 |
507 // Fix for bug #4668531 |
513 // Fix for bug #4668531 |
508 MemRegion mangle_region(_the_space->end(), (HeapWord*)_virtual_space.high()); |
514 if (ZapUnusedHeapArea) { |
509 _the_space->mangle_region(mangle_region); |
515 MemRegion mangle_region(_the_space->end(), |
|
516 (HeapWord*)_virtual_space.high()); |
|
517 SpaceMangler::mangle_region(mangle_region); |
|
518 } |
510 |
519 |
511 // Expand space -- also expands space's BOT |
520 // Expand space -- also expands space's BOT |
512 // (which uses (part of) shared array above) |
521 // (which uses (part of) shared array above) |
513 _the_space->set_end((HeapWord*)_virtual_space.high()); |
522 _the_space->set_end((HeapWord*)_virtual_space.high()); |
514 |
523 |
620 void OneContigSpaceCardGeneration::gc_epilogue(bool full) { |
629 void OneContigSpaceCardGeneration::gc_epilogue(bool full) { |
621 _last_gc = WaterMark(the_space(), the_space()->top()); |
630 _last_gc = WaterMark(the_space(), the_space()->top()); |
622 |
631 |
623 // update the generation and space performance counters |
632 // update the generation and space performance counters |
624 update_counters(); |
633 update_counters(); |
|
634 if (ZapUnusedHeapArea) { |
|
635 the_space()->check_mangled_unused_area_complete(); |
|
636 } |
|
637 } |
|
638 |
|
639 void OneContigSpaceCardGeneration::record_spaces_top() { |
|
640 assert(ZapUnusedHeapArea, "Not mangling unused space"); |
|
641 the_space()->set_top_for_allocations(); |
625 } |
642 } |
626 |
643 |
627 void OneContigSpaceCardGeneration::verify(bool allow_dirty) { |
644 void OneContigSpaceCardGeneration::verify(bool allow_dirty) { |
628 the_space()->verify(allow_dirty); |
645 the_space()->verify(allow_dirty); |
629 } |
646 } |