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