290 // min_fill_size() is the smallest region that can be filled.
291 // fill_with_objects() can fill arbitrary-sized regions of the heap using
292 // multiple objects. fill_with_object() is for regions known to be smaller
293 // than the largest array of integers; it uses a single object to fill the
294 // region and has slightly less overhead.
295 static size_t min_fill_size() {
296 return size_t(align_object_size(oopDesc::header_size()));
297 }
298
299 static void fill_with_objects(HeapWord* start, size_t words, bool zap = true);
300
301 static void fill_with_object(HeapWord* start, size_t words, bool zap = true);
302 static void fill_with_object(MemRegion region, bool zap = true) {
303 fill_with_object(region.start(), region.word_size(), zap);
304 }
305 static void fill_with_object(HeapWord* start, HeapWord* end, bool zap = true) {
306 fill_with_object(start, pointer_delta(end, start), zap);
307 }
308
309 virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap);
310 static constexpr size_t min_dummy_object_size() {
311 return oopDesc::header_size();
312 }
313
314 static size_t lab_alignment_reserve() {
315 assert(_lab_alignment_reserve != SIZE_MAX, "uninitialized");
316 return _lab_alignment_reserve;
317 }
318
319 // Some heaps may be in an unparseable state at certain times between
320 // collections. This may be necessary for efficient implementation of
321 // certain allocation-related activities. Calling this function before
322 // attempting to parse a heap ensures that the heap is in a parsable
323 // state (provided other concurrent activity does not introduce
324 // unparsability). It is normally expected, therefore, that this
325 // method is invoked with the world stopped.
326 // NOTE: if you override this method, make sure you call
327 // super::ensure_parsability so that the non-generational
328 // part of the work gets done. See implementation of
329 // CollectedHeap::ensure_parsability and, for instance,
330 // that of GenCollectedHeap::ensure_parsability().
|
290 // min_fill_size() is the smallest region that can be filled.
291 // fill_with_objects() can fill arbitrary-sized regions of the heap using
292 // multiple objects. fill_with_object() is for regions known to be smaller
293 // than the largest array of integers; it uses a single object to fill the
294 // region and has slightly less overhead.
295 static size_t min_fill_size() {
296 return size_t(align_object_size(oopDesc::header_size()));
297 }
298
299 static void fill_with_objects(HeapWord* start, size_t words, bool zap = true);
300
301 static void fill_with_object(HeapWord* start, size_t words, bool zap = true);
302 static void fill_with_object(MemRegion region, bool zap = true) {
303 fill_with_object(region.start(), region.word_size(), zap);
304 }
305 static void fill_with_object(HeapWord* start, HeapWord* end, bool zap = true) {
306 fill_with_object(start, pointer_delta(end, start), zap);
307 }
308
309 virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap);
310 static size_t min_dummy_object_size() {
311 return oopDesc::header_size();
312 }
313
314 static size_t lab_alignment_reserve() {
315 assert(_lab_alignment_reserve != SIZE_MAX, "uninitialized");
316 return _lab_alignment_reserve;
317 }
318
319 // Some heaps may be in an unparseable state at certain times between
320 // collections. This may be necessary for efficient implementation of
321 // certain allocation-related activities. Calling this function before
322 // attempting to parse a heap ensures that the heap is in a parsable
323 // state (provided other concurrent activity does not introduce
324 // unparsability). It is normally expected, therefore, that this
325 // method is invoked with the world stopped.
326 // NOTE: if you override this method, make sure you call
327 // super::ensure_parsability so that the non-generational
328 // part of the work gets done. See implementation of
329 // CollectedHeap::ensure_parsability and, for instance,
330 // that of GenCollectedHeap::ensure_parsability().
|