< prev index next >

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

Print this page

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

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