--- old/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp 2015-02-23 09:52:09.815372413 +0100 +++ new/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp 2015-02-23 09:52:09.759370788 +0100 @@ -28,12 +28,12 @@ #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(); } @@ -41,9 +41,11 @@ _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 --- old/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp 2015-02-23 09:52:10.153382226 +0100 +++ new/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp 2015-02-23 09:52:10.095380542 +0100 @@ -55,9 +55,9 @@ virtual ~ParGCAllocBuffer() {} // Minimum PLAB size. - static const size_t min_size(); + static size_t min_size(); // Maximum PLAB size. - static const size_t max_size(); + static size_t max_size(); // If an allocation of the given "word_sz" can be satisfied within the // buffer, do the allocation, returning a pointer to the start of the