718 } 719 720 721 size_t PSYoungGen::free_in_words() const { 722 return eden_space()->free_in_words() 723 + from_space()->free_in_words(); // to_space() is only used during scavenge 724 } 725 726 void PSYoungGen::object_iterate(ObjectClosure* blk) { 727 eden_space()->object_iterate(blk); 728 from_space()->object_iterate(blk); 729 to_space()->object_iterate(blk); 730 } 731 732 void PSYoungGen::precompact() { 733 eden_mark_sweep()->precompact(); 734 from_mark_sweep()->precompact(); 735 to_mark_sweep()->precompact(); 736 } 737 738 void PSYoungGen::adjust_pointers() { 739 eden_mark_sweep()->adjust_pointers(); 740 from_mark_sweep()->adjust_pointers(); 741 to_mark_sweep()->adjust_pointers(); 742 } 743 744 void PSYoungGen::compact() { 745 eden_mark_sweep()->compact(ZapUnusedHeapArea); 746 from_mark_sweep()->compact(ZapUnusedHeapArea); 747 // Mark sweep stores preserved markOops in to space, don't disturb! 748 to_mark_sweep()->compact(false); 749 } 750 751 void PSYoungGen::print() const { print_on(tty); } 752 void PSYoungGen::print_on(outputStream* st) const { 753 st->print(" %-15s", "PSYoungGen"); 754 st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", 755 capacity_in_bytes()/K, used_in_bytes()/K); 756 virtual_space()->print_space_boundaries_on(st); 757 st->print(" eden"); eden_space()->print_on(st); 758 st->print(" from"); from_space()->print_on(st); 759 st->print(" to "); to_space()->print_on(st); 760 } 761 | 718 } 719 720 721 size_t PSYoungGen::free_in_words() const { 722 return eden_space()->free_in_words() 723 + from_space()->free_in_words(); // to_space() is only used during scavenge 724 } 725 726 void PSYoungGen::object_iterate(ObjectClosure* blk) { 727 eden_space()->object_iterate(blk); 728 from_space()->object_iterate(blk); 729 to_space()->object_iterate(blk); 730 } 731 732 void PSYoungGen::precompact() { 733 eden_mark_sweep()->precompact(); 734 from_mark_sweep()->precompact(); 735 to_mark_sweep()->precompact(); 736 } 737 738 void PSYoungGen::adjust_pointers(MarkSweep* ms) { 739 eden_mark_sweep()->adjust_pointers(ms); 740 from_mark_sweep()->adjust_pointers(ms); 741 to_mark_sweep()->adjust_pointers(ms); 742 } 743 744 void PSYoungGen::compact() { 745 eden_mark_sweep()->compact(ZapUnusedHeapArea); 746 from_mark_sweep()->compact(ZapUnusedHeapArea); 747 // Mark sweep stores preserved markOops in to space, don't disturb! 748 to_mark_sweep()->compact(false); 749 } 750 751 void PSYoungGen::print() const { print_on(tty); } 752 void PSYoungGen::print_on(outputStream* st) const { 753 st->print(" %-15s", "PSYoungGen"); 754 st->print(" total " SIZE_FORMAT "K, used " SIZE_FORMAT "K", 755 capacity_in_bytes()/K, used_in_bytes()/K); 756 virtual_space()->print_space_boundaries_on(st); 757 st->print(" eden"); eden_space()->print_on(st); 758 st->print(" from"); from_space()->print_on(st); 759 st->print(" to "); to_space()->print_on(st); 760 } 761 |