< prev index next >
src/hotspot/share/gc/shared/plab.cpp
Print this page
@@ -22,10 +22,11 @@
*
*/
#include "precompiled.hpp"
#include "gc/shared/collectedHeap.hpp"
+#include "gc/shared/fill.hpp"
#include "gc/shared/plab.inline.hpp"
#include "gc/shared/threadLocalAllocBuffer.hpp"
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
@@ -40,11 +41,11 @@
PLAB::PLAB(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)
{
- AlignmentReserve = Universe::heap()->tlab_alloc_reserve();
+ AlignmentReserve = Fill::min_reserve_size();
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);
}
@@ -78,18 +79,18 @@
}
size_t PLAB::retire_internal() {
size_t result = 0;
if (_top < _hard_end) {
- Universe::heap()->fill_with_dummy_object(_top, _hard_end, true);
+ Fill::range(_top, _hard_end);
result += invalidate();
}
return result;
}
void PLAB::add_undo_waste(HeapWord* obj, size_t word_sz) {
- Universe::heap()->fill_with_dummy_object(obj, obj + word_sz, true);
+ Fill::range(obj, word_sz);
_undo_wasted += word_sz;
}
void PLAB::undo_last_allocation(HeapWord* obj, size_t word_sz) {
assert(pointer_delta(_top, _bottom) >= word_sz, "Bad undo");
< prev index next >