mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 18:03:44 +00:00
8370078: Remove unnecessary argument in ContiguousSpace::initialize
Reviewed-by: fandreuzzi, jsikstro
This commit is contained in:
parent
2be273f20f
commit
a0c4124432
@ -52,7 +52,7 @@ jint EpsilonHeap::initialize() {
|
||||
initialize_reserved_region(heap_rs);
|
||||
|
||||
_space = new ContiguousSpace();
|
||||
_space->initialize(committed_region, /* clear_space = */ true, /* mangle_space = */ true);
|
||||
_space->initialize(committed_region, /* clear_space = */ true);
|
||||
|
||||
// Precompute hot fields
|
||||
_max_tlab_size = MIN2(CollectedHeap::max_tlab_size(), align_object_size(EpsilonMaxTLABSize / HeapWordSize));
|
||||
|
||||
@ -297,9 +297,9 @@ void DefNewGeneration::init_spaces() {
|
||||
MemRegion edenMR((HeapWord*)eden_start, (HeapWord*)eden_end);
|
||||
|
||||
// Reset the spaces for their new regions.
|
||||
from()->initialize(fromMR, from()->is_empty(), SpaceDecorator::Mangle);
|
||||
to()->initialize(toMR, true, SpaceDecorator::Mangle);
|
||||
eden()->initialize(edenMR, true, SpaceDecorator::Mangle);
|
||||
from()->initialize(fromMR, from()->is_empty());
|
||||
to()->initialize(toMR, true);
|
||||
eden()->initialize(edenMR, true);
|
||||
|
||||
post_resize();
|
||||
}
|
||||
@ -340,7 +340,7 @@ void DefNewGeneration::expand_eden_by(size_t delta_bytes) {
|
||||
}
|
||||
|
||||
MemRegion eden_mr{eden()->bottom(), (HeapWord*)_virtual_space.high()};
|
||||
eden()->initialize(eden_mr, eden()->is_empty(), SpaceDecorator::Mangle);
|
||||
eden()->initialize(eden_mr, eden()->is_empty());
|
||||
|
||||
post_resize();
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ TenuredGeneration::TenuredGeneration(ReservedSpace rs,
|
||||
HeapWord* bottom = (HeapWord*) _virtual_space.low();
|
||||
HeapWord* end = (HeapWord*) _virtual_space.high();
|
||||
_the_space = new ContiguousSpace();
|
||||
_the_space->initialize(MemRegion(bottom, end), SpaceDecorator::Clear, SpaceDecorator::Mangle);
|
||||
_the_space->initialize(MemRegion(bottom, end), SpaceDecorator::Clear);
|
||||
// If we don't shrink the heap in steps, '_shrink_factor' is always 100%.
|
||||
_shrink_factor = ShrinkHeapInSteps ? 0 : 100;
|
||||
_capacity_at_prologue = 0;
|
||||
|
||||
@ -44,8 +44,7 @@ ContiguousSpace::ContiguousSpace():
|
||||
_top(nullptr) {}
|
||||
|
||||
void ContiguousSpace::initialize(MemRegion mr,
|
||||
bool clear_space,
|
||||
bool mangle_space) {
|
||||
bool clear_space) {
|
||||
HeapWord* bottom = mr.start();
|
||||
HeapWord* end = mr.end();
|
||||
assert(Universe::on_page_boundary(bottom) && Universe::on_page_boundary(end),
|
||||
@ -55,7 +54,7 @@ void ContiguousSpace::initialize(MemRegion mr,
|
||||
if (clear_space) {
|
||||
clear(SpaceDecorator::DontMangle);
|
||||
}
|
||||
if (ZapUnusedHeapArea && mangle_space) {
|
||||
if (ZapUnusedHeapArea) {
|
||||
mangle_unused_area();
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ public:
|
||||
// any purpose. The "mr" arguments gives the bounds of the space, and
|
||||
// the "clear_space" argument should be true unless the memory in "mr" is
|
||||
// known to be zeroed.
|
||||
void initialize(MemRegion mr, bool clear_space, bool mangle_space);
|
||||
void initialize(MemRegion mr, bool clear_space);
|
||||
|
||||
// The "clear" method must be called on a region that may have
|
||||
// had allocation performed in it, but is now to be considered empty.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user