< prev index next >

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

Print this page

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

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