< prev index next >

src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp

Print this page
rev 7799 : [mq]: 8073466-remove-ratining-functionality-in-pargcallocbuffer
rev 7800 : [mq]: 8073466-kim-fixes

@@ -26,26 +26,28 @@
 #include "gc_implementation/shared/parGCAllocBuffer.hpp"
 #include "memory/threadLocalAllocBuffer.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/oop.inline.hpp"
 
-const size_t ParGCAllocBuffer::min_size() {
+size_t ParGCAllocBuffer::min_size() {
   // Make sure that we return something that is larger than AlignmentReserve
   return align_object_size(MAX2(MinTLABSize / HeapWordSize, (uintx)oopDesc::header_size())) + AlignmentReserve;
 }
 
-const size_t ParGCAllocBuffer::max_size() {
+size_t ParGCAllocBuffer::max_size() {
   return ThreadLocalAllocBuffer::max_size();
 }
 
 ParGCAllocBuffer::ParGCAllocBuffer(size_t desired_plab_sz_) :
   _word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL),
   _end(NULL), _hard_end(NULL), _allocated(0), _wasted(0)
 {
-  assert (min_size() > AlignmentReserve, "Inconsistency!");
   // ArrayOopDesc::header_size depends on command line initialization.
   AlignmentReserve = oopDesc::header_size() > MinObjAlignment ? align_object_size(arrayOopDesc::header_size(T_INT)) : 0;
+  assert(min_size() > AlignmentReserve,
+         err_msg("Minimum PLAB size " SIZE_FORMAT" must be larger than alignment reserve " SIZE_FORMAT" "
+                 "to be able to contain objects", min_size(), AlignmentReserve));
 }
 
 // If the minimum object size is greater than MinObjAlignment, we can
 // end up with a shard at the end of the buffer that's smaller than
 // the smallest object.  We can't allow that because the buffer must
< prev index next >