174 // Fill with a single array; caller must ensure filler_array_min_size() <=
175 // words <= filler_array_max_size().
176 static inline void fill_with_array(HeapWord* start, size_t words, bool zap = true);
177
178 // Fill with a single object (either an int array or a java.lang.Object).
179 static inline void fill_with_object_impl(HeapWord* start, size_t words, bool zap = true);
180
181 virtual void trace_heap(GCWhen::Type when, const GCTracer* tracer);
182
183 // Verification functions
184 virtual void check_for_bad_heap_word_value(HeapWord* addr, size_t size)
185 PRODUCT_RETURN;
186 virtual void check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
187 PRODUCT_RETURN;
188 debug_only(static void check_for_valid_allocation_state();)
189
190 public:
191 enum Name {
192 GenCollectedHeap,
193 ParallelScavengeHeap,
194 G1CollectedHeap
195 };
196
197 static inline size_t filler_array_max_size() {
198 return _filler_array_max_size;
199 }
200
201 virtual Name kind() const = 0;
202
203 virtual const char* name() const = 0;
204
205 /**
206 * Returns JNI error code JNI_ENOMEM if memory could not be allocated,
207 * and JNI_OK on success.
208 */
209 virtual jint initialize() = 0;
210
211 // In many heaps, there will be a need to perform some initialization activities
212 // after the Universe is fully formed, but before general heap allocation is allowed.
213 // This is the correct place to place such initialization methods.
214 virtual void post_initialize() = 0;
|
174 // Fill with a single array; caller must ensure filler_array_min_size() <=
175 // words <= filler_array_max_size().
176 static inline void fill_with_array(HeapWord* start, size_t words, bool zap = true);
177
178 // Fill with a single object (either an int array or a java.lang.Object).
179 static inline void fill_with_object_impl(HeapWord* start, size_t words, bool zap = true);
180
181 virtual void trace_heap(GCWhen::Type when, const GCTracer* tracer);
182
183 // Verification functions
184 virtual void check_for_bad_heap_word_value(HeapWord* addr, size_t size)
185 PRODUCT_RETURN;
186 virtual void check_for_non_bad_heap_word_value(HeapWord* addr, size_t size)
187 PRODUCT_RETURN;
188 debug_only(static void check_for_valid_allocation_state();)
189
190 public:
191 enum Name {
192 GenCollectedHeap,
193 ParallelScavengeHeap,
194 G1CollectedHeap,
195 EpsilonCollectedHeap,
196 };
197
198 static inline size_t filler_array_max_size() {
199 return _filler_array_max_size;
200 }
201
202 virtual Name kind() const = 0;
203
204 virtual const char* name() const = 0;
205
206 /**
207 * Returns JNI error code JNI_ENOMEM if memory could not be allocated,
208 * and JNI_OK on success.
209 */
210 virtual jint initialize() = 0;
211
212 // In many heaps, there will be a need to perform some initialization activities
213 // after the Universe is fully formed, but before general heap allocation is allowed.
214 // This is the correct place to place such initialization methods.
215 virtual void post_initialize() = 0;
|