838 // |
838 // |
839 // Survivor regions policy. |
839 // Survivor regions policy. |
840 // |
840 // |
841 |
841 |
842 // Current tenuring threshold, set to 0 if the collector reaches the |
842 // Current tenuring threshold, set to 0 if the collector reaches the |
843 // maximum amount of suvivors regions. |
843 // maximum amount of survivors regions. |
844 int _tenuring_threshold; |
844 uint _tenuring_threshold; |
845 |
845 |
846 // The limit on the number of regions allocated for survivors. |
846 // The limit on the number of regions allocated for survivors. |
847 uint _max_survivor_regions; |
847 uint _max_survivor_regions; |
848 |
848 |
849 // For reporting purposes. |
849 // For reporting purposes. |
850 size_t _eden_bytes_before_gc; |
850 size_t _eden_bytes_before_gc; |
851 size_t _survivor_bytes_before_gc; |
851 size_t _survivor_bytes_before_gc; |
852 size_t _capacity_before_gc; |
852 size_t _capacity_before_gc; |
853 |
853 |
854 // The amount of survor regions after a collection. |
854 // The amount of survivor regions after a collection. |
855 uint _recorded_survivor_regions; |
855 uint _recorded_survivor_regions; |
856 // List of survivor regions. |
856 // List of survivor regions. |
857 HeapRegion* _recorded_survivor_head; |
857 HeapRegion* _recorded_survivor_head; |
858 HeapRegion* _recorded_survivor_tail; |
858 HeapRegion* _recorded_survivor_tail; |
859 |
859 |
860 ageTable _survivors_age_table; |
860 ageTable _survivors_age_table; |
861 |
861 |
862 public: |
862 public: |
863 |
863 |
864 inline GCAllocPurpose |
864 inline GCAllocPurpose |
865 evacuation_destination(HeapRegion* src_region, int age, size_t word_sz) { |
865 evacuation_destination(HeapRegion* src_region, uint age, size_t word_sz) { |
866 if (age < _tenuring_threshold && src_region->is_young()) { |
866 if (age < _tenuring_threshold && src_region->is_young()) { |
867 return GCAllocForSurvived; |
867 return GCAllocForSurvived; |
868 } else { |
868 } else { |
869 return GCAllocForTenured; |
869 return GCAllocForTenured; |
870 } |
870 } |