< prev index next >
src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp
Print this page
*** 37,47 ****
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)
{
// 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" "
--- 37,47 ----
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), _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;
assert(min_size() > AlignmentReserve,
err_msg("Minimum PLAB size " SIZE_FORMAT" must be larger than alignment reserve " SIZE_FORMAT" "
*** 67,76 ****
--- 67,77 ----
// Since we have flushed the stats we need to clear the _allocated and _wasted
// fields in case somebody retains an instance of this over GCs. Not doing so
// will artifically inflate the values in the statistics.
_allocated = 0;
_wasted = 0;
+ _undo_wasted = 0;
}
void ParGCAllocBuffer::retire() {
_wasted += retire_internal();
}
< prev index next >