< prev index next >

src/hotspot/share/gc/shared/collectedHeap.hpp

Print this page

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

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