189 static inline void fill_with_array(HeapWord* start, size_t words, bool zap = true);
190
191 // Fill with a single object (either an int array or a java.lang.Object).
192 static inline void fill_with_object_impl(HeapWord* start, size_t words, bool zap = true);
193
194 virtual void trace_heap(GCWhen::Type when, const GCTracer* tracer);
195
196 // Verification functions
197 virtual void check_for_bad_heap_word_value(HeapWord* addr, size_t size)
198 PRODUCT_RETURN;
199 virtual void check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
200 PRODUCT_RETURN;
201 debug_only(static void check_for_valid_allocation_state();)
202
203 public:
204 enum Name {
205 None,
206 Serial,
207 Parallel,
208 CMS,
209 G1
210 };
211
212 static inline size_t filler_array_max_size() {
213 return _filler_array_max_size;
214 }
215
216 virtual Name kind() const = 0;
217
218 virtual const char* name() const = 0;
219
220 /**
221 * Returns JNI error code JNI_ENOMEM if memory could not be allocated,
222 * and JNI_OK on success.
223 */
224 virtual jint initialize() = 0;
225
226 // In many heaps, there will be a need to perform some initialization activities
227 // after the Universe is fully formed, but before general heap allocation is allowed.
228 // This is the correct place to place such initialization methods.
229 virtual void post_initialize();
|
189 static inline void fill_with_array(HeapWord* start, size_t words, bool zap = true);
190
191 // Fill with a single object (either an int array or a java.lang.Object).
192 static inline void fill_with_object_impl(HeapWord* start, size_t words, bool zap = true);
193
194 virtual void trace_heap(GCWhen::Type when, const GCTracer* tracer);
195
196 // Verification functions
197 virtual void check_for_bad_heap_word_value(HeapWord* addr, size_t size)
198 PRODUCT_RETURN;
199 virtual void check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
200 PRODUCT_RETURN;
201 debug_only(static void check_for_valid_allocation_state();)
202
203 public:
204 enum Name {
205 None,
206 Serial,
207 Parallel,
208 CMS,
209 G1,
210 Epsilon
211 };
212
213 static inline size_t filler_array_max_size() {
214 return _filler_array_max_size;
215 }
216
217 virtual Name kind() const = 0;
218
219 virtual const char* name() const = 0;
220
221 /**
222 * Returns JNI error code JNI_ENOMEM if memory could not be allocated,
223 * and JNI_OK on success.
224 */
225 virtual jint initialize() = 0;
226
227 // In many heaps, there will be a need to perform some initialization activities
228 // after the Universe is fully formed, but before general heap allocation is allowed.
229 // This is the correct place to place such initialization methods.
230 virtual void post_initialize();
|