< prev index next >
src/hotspot/share/gc/parallel/adjoiningGenerationsForHeteroHeap.cpp
Print this page
rev 52626 : webrev.03
rev 52627 : some comments from Sangheon
rev 52628 : changes for full GC
@@ -98,44 +98,48 @@
return total_size_limit();
}
AdjoiningGenerationsForHeteroHeap::HeteroVirtualSpaces::HeteroVirtualSpaces(ReservedSpace rs, size_t min_old_byte_size, size_t min_yg_byte_size, size_t max_total_size, size_t alignment) :
AdjoiningVirtualSpaces(rs, min_old_byte_size, min_yg_byte_size, alignment),
+ _max_total_size(max_total_size),
_min_old_byte_size(min_old_byte_size), _min_young_byte_size(min_yg_byte_size),
_max_old_byte_size(_max_total_size - _min_young_byte_size),
- _max_young_byte_size(_max_total_size - _min_old_byte_size),
- _max_total_size(max_total_size) {
+ _max_young_byte_size(_max_total_size - _min_old_byte_size) {
}
void AdjoiningGenerationsForHeteroHeap::HeteroVirtualSpaces::initialize(size_t initial_old_reserved_size, size_t init_old_byte_size,
size_t init_young_byte_size) {
// This is the reserved space exclusively for old generation.
- ReservedSpace old_rs = _reserved_space.first_part(_max_old_byte_size, true);
+ ReservedSpace low_rs = _reserved_space.first_part(_max_old_byte_size, true);
// Intially we only assign 'initial_old_reserved_size' of the reserved space to old virtual space.
- old_rs = old_rs.first_part(initial_old_reserved_size);
+ low_rs = low_rs.first_part(initial_old_reserved_size);
// This is the reserved space exclusively for young generation.
- ReservedSpace young_rs = _reserved_space.last_part(_max_old_byte_size).first_part(_max_young_byte_size);
+ ReservedSpace high_rs = _reserved_space.last_part(_max_old_byte_size).first_part(_max_young_byte_size);
// Carve out 'initial_young_reserved_size' of reserved space.
size_t initial_young_reserved_size = _max_total_size - initial_old_reserved_size;
- young_rs = young_rs.last_part(_max_young_byte_size - initial_young_reserved_size);
+ high_rs = high_rs.last_part(_max_young_byte_size - initial_young_reserved_size);
+
+ _low = new PSFileBackedVirtualSpace(low_rs, alignment(), AllocateOldGenAt);
+ if (!static_cast <PSFileBackedVirtualSpace*>(_low)->initialize()) {
+ vm_exit_during_initialization("Could not map space for old generation at given AllocateOldGenAt path");
+ }
- _low = new PSFileBackedVirtualSpace(old_rs, alignment(), AllocateOldGenAt);
if (!_low->expand_by(init_old_byte_size)) {
vm_exit_during_initialization("Could not reserve enough space for object heap");
}
- _high = new PSVirtualSpaceHighToLow(young_rs, alignment());
+ _high = new PSVirtualSpaceHighToLow(high_rs, alignment());
if (!_high->expand_by(init_young_byte_size)) {
vm_exit_during_initialization("Could not reserve enough space for object heap");
}
}
// Since the virtual spaces are non-overlapping, there is no boundary as such.
-// We replicate the same behavior and maintain the same invariants as base class - AdjoiningVirtualSpaces, by
+// We replicate the same behavior and maintain the same invariants as base class 'AdjoiningVirtualSpaces' by
// increasing old generation size and decreasing young generation size by same amount.
bool AdjoiningGenerationsForHeteroHeap::HeteroVirtualSpaces::adjust_boundary_up(size_t change_in_bytes) {
assert(UseAdaptiveSizePolicy && UseAdaptiveGCBoundary, "runtime check");
DEBUG_ONLY(size_t total_size_before = young_vs()->reserved_size() + old_vs()->reserved_size());
< prev index next >