1102
1103 // These virtual functions do the actual allocation.
1104 // Some heaps may offer a contiguous region for shared non-blocking
1105 // allocation, via inlined code (by exporting the address of the top and
1106 // end fields defining the extent of the contiguous allocation region.)
1107 // But G1CollectedHeap doesn't yet support this.
1108
1109 virtual bool is_maximal_no_gc() const {
1110 return _hrm.available() == 0;
1111 }
1112
1113 // The current number of regions in the heap.
1114 uint num_regions() const { return _hrm.length(); }
1115
1116 // The max number of regions in the heap.
1117 uint max_regions() const { return _hrm.max_length(); }
1118
1119 // The number of regions that are completely free.
1120 uint num_free_regions() const { return _hrm.num_free_regions(); }
1121
1122 // The number of regions that are not completely free.
1123 uint num_used_regions() const { return num_regions() - num_free_regions(); }
1124
1125 void verify_not_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1126 void verify_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1127 void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN;
1128 void verify_dirty_young_regions() PRODUCT_RETURN;
1129
1130 #ifndef PRODUCT
1131 // Make sure that the given bitmap has no marked objects in the
1132 // range [from,limit). If it does, print an error message and return
1133 // false. Otherwise, just return true. bitmap_name should be "prev"
1134 // or "next".
1135 bool verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap,
1136 HeapWord* from, HeapWord* limit);
1137
1138 // Verify that the prev / next bitmap range [tams,end) for the given
1139 // region has no marks. Return true if all is well, false if errors
1140 // are detected.
1141 bool verify_bitmaps(const char* caller, HeapRegion* hr);
|
1102
1103 // These virtual functions do the actual allocation.
1104 // Some heaps may offer a contiguous region for shared non-blocking
1105 // allocation, via inlined code (by exporting the address of the top and
1106 // end fields defining the extent of the contiguous allocation region.)
1107 // But G1CollectedHeap doesn't yet support this.
1108
1109 virtual bool is_maximal_no_gc() const {
1110 return _hrm.available() == 0;
1111 }
1112
1113 // The current number of regions in the heap.
1114 uint num_regions() const { return _hrm.length(); }
1115
1116 // The max number of regions in the heap.
1117 uint max_regions() const { return _hrm.max_length(); }
1118
1119 // The number of regions that are completely free.
1120 uint num_free_regions() const { return _hrm.num_free_regions(); }
1121
1122 MemoryUsage get_auxiliary_data_memory_usage() const {
1123 return _hrm.get_auxiliary_data_memory_usage();
1124 }
1125
1126 // The number of regions that are not completely free.
1127 uint num_used_regions() const { return num_regions() - num_free_regions(); }
1128
1129 void verify_not_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1130 void verify_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
1131 void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN;
1132 void verify_dirty_young_regions() PRODUCT_RETURN;
1133
1134 #ifndef PRODUCT
1135 // Make sure that the given bitmap has no marked objects in the
1136 // range [from,limit). If it does, print an error message and return
1137 // false. Otherwise, just return true. bitmap_name should be "prev"
1138 // or "next".
1139 bool verify_no_bits_over_tams(const char* bitmap_name, CMBitMapRO* bitmap,
1140 HeapWord* from, HeapWord* limit);
1141
1142 // Verify that the prev / next bitmap range [tams,end) for the given
1143 // region has no marks. Return true if all is well, false if errors
1144 // are detected.
1145 bool verify_bitmaps(const char* caller, HeapRegion* hr);
|