src/hotspot/share/gc/shared/plab.cpp
changeset 52124 c64384f414bc
parent 50676 8c0a5b51559b
child 54786 ebf733a324d4
--- a/src/hotspot/share/gc/shared/plab.cpp	Mon Oct 15 09:35:05 2018 -0700
+++ b/src/hotspot/share/gc/shared/plab.cpp	Wed Oct 10 23:05:15 2018 +0200
@@ -27,7 +27,6 @@
 #include "gc/shared/plab.inline.hpp"
 #include "gc/shared/threadLocalAllocBuffer.hpp"
 #include "logging/log.hpp"
-#include "oops/arrayOop.hpp"
 #include "oops/oop.inline.hpp"
 
 size_t PLAB::min_size() {
@@ -43,8 +42,7 @@
   _word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL),
   _end(NULL), _hard_end(NULL), _allocated(0), _wasted(0), _undo_wasted(0)
 {
-  // ArrayOopDesc::header_size depends on command line initialization.
-  AlignmentReserve = oopDesc::header_size() > MinObjAlignment ? align_object_size(arrayOopDesc::header_size(T_INT)) : 0;
+  AlignmentReserve = Universe::heap()->tlab_alloc_reserve();
   assert(min_size() > AlignmentReserve,
          "Minimum PLAB size " SIZE_FORMAT " must be larger than alignment reserve " SIZE_FORMAT " "
          "to be able to contain objects", min_size(), AlignmentReserve);