Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/epsilon/epsilonHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/share/gc/serial/defNewGeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/serial/tenuredGeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/share/gc/shared/space.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -55,7 +54,7 @@ void ContiguousSpace::initialize(MemRegion mr,
if (clear_space) {
clear(SpaceDecorator::DontMangle);
}
if (ZapUnusedHeapArea && mangle_space) {
if (ZapUnusedHeapArea) {
mangle_unused_area();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shared/space.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ContiguousSpace: public CHeapObj<mtGC> {
// 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.
Expand Down