115 116 // Return the (conservative) maximum heap alignment 117 static size_t conservative_max_heap_alignment() { 118 return CollectorPolicy::compute_heap_alignment(); 119 } 120 121 size_t capacity() const; 122 size_t used() const; 123 124 // Return "true" if all generations have reached the 125 // maximal committed limit that they can reach, without a garbage 126 // collection. 127 virtual bool is_maximal_no_gc() const; 128 129 // Return true if the reference points to an object that 130 // can be moved in a partial collection. For currently implemented 131 // generational collectors that means during a collection of 132 // the young gen. 133 virtual bool is_scavengable(const void* addr); 134 135 // Does this heap support heap inspection? (+PrintClassHistogram) 136 bool supports_heap_inspection() const { return true; } 137 138 size_t max_capacity() const; 139 140 // Whether p is in the allocated part of the heap 141 bool is_in(const void* p) const; 142 143 bool is_in_reserved(const void* p) const; 144 145 bool is_in_young(oop p); // reserved part 146 bool is_in_old(oop p); // reserved part 147 148 // Memory allocation. "gc_time_limit_was_exceeded" will 149 // be set to true if the adaptive size policy determine that 150 // an excessive amount of time is being spent doing collections 151 // and caused a NULL to be returned. If a NULL is not returned, 152 // "gc_time_limit_was_exceeded" has an undefined meaning. 153 HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded); 154 155 // Allocation attempt(s) during a safepoint. It should never be called 156 // to allocate a new TLAB as this allocation might be satisfied out 157 // of the old generation. | 115 116 // Return the (conservative) maximum heap alignment 117 static size_t conservative_max_heap_alignment() { 118 return CollectorPolicy::compute_heap_alignment(); 119 } 120 121 size_t capacity() const; 122 size_t used() const; 123 124 // Return "true" if all generations have reached the 125 // maximal committed limit that they can reach, without a garbage 126 // collection. 127 virtual bool is_maximal_no_gc() const; 128 129 // Return true if the reference points to an object that 130 // can be moved in a partial collection. For currently implemented 131 // generational collectors that means during a collection of 132 // the young gen. 133 virtual bool is_scavengable(const void* addr); 134 135 size_t max_capacity() const; 136 137 // Whether p is in the allocated part of the heap 138 bool is_in(const void* p) const; 139 140 bool is_in_reserved(const void* p) const; 141 142 bool is_in_young(oop p); // reserved part 143 bool is_in_old(oop p); // reserved part 144 145 // Memory allocation. "gc_time_limit_was_exceeded" will 146 // be set to true if the adaptive size policy determine that 147 // an excessive amount of time is being spent doing collections 148 // and caused a NULL to be returned. If a NULL is not returned, 149 // "gc_time_limit_was_exceeded" has an undefined meaning. 150 HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded); 151 152 // Allocation attempt(s) during a safepoint. It should never be called 153 // to allocate a new TLAB as this allocation might be satisfied out 154 // of the old generation. |