< prev index next >
src/hotspot/share/gc/parallel/adjoiningGenerations.cpp
Print this page
rev 52004 : webrev.02
*** 38,49 ****
// the old behavior otherwise (with PSYoungGen and PSOldGen).
AdjoiningGenerations::AdjoiningGenerations(ReservedSpace old_young_rs,
GenerationSizer* policy,
size_t alignment) :
! _virtual_spaces(old_young_rs, policy->min_old_size(),
! policy->min_young_size(), alignment) {
size_t init_low_byte_size = policy->initial_old_size();
size_t min_low_byte_size = policy->min_old_size();
size_t max_low_byte_size = policy->max_old_size();
size_t init_high_byte_size = policy->initial_young_size();
size_t min_high_byte_size = policy->min_young_size();
--- 38,49 ----
// the old behavior otherwise (with PSYoungGen and PSOldGen).
AdjoiningGenerations::AdjoiningGenerations(ReservedSpace old_young_rs,
GenerationSizer* policy,
size_t alignment) :
! _virtual_spaces(new AdjoiningVirtualSpaces(old_young_rs, policy->min_old_size(),
! policy->min_young_size(), alignment)) {
size_t init_low_byte_size = policy->initial_old_size();
size_t min_low_byte_size = policy->min_old_size();
size_t max_low_byte_size = policy->max_old_size();
size_t init_high_byte_size = policy->initial_young_size();
size_t min_high_byte_size = policy->min_young_size();
*** 59,83 ****
// Initialize the adjoining virtual spaces. Then pass the
// a virtual to each generation for initialization of the
// generation.
// Does the actual creation of the virtual spaces
! _virtual_spaces.initialize(max_low_byte_size,
init_low_byte_size,
init_high_byte_size);
// Place the young gen at the high end. Passes in the virtual space.
! _young_gen = new ASPSYoungGen(_virtual_spaces.high(),
! _virtual_spaces.high()->committed_size(),
min_high_byte_size,
! _virtual_spaces.high_byte_size_limit());
// Place the old gen at the low end. Passes in the virtual space.
! _old_gen = new ASPSOldGen(_virtual_spaces.low(),
! _virtual_spaces.low()->committed_size(),
min_low_byte_size,
! _virtual_spaces.low_byte_size_limit(),
"old", 1);
young_gen()->initialize_work();
assert(young_gen()->reserved().byte_size() <= young_gen()->gen_size_limit(),
"Consistency check");
--- 59,83 ----
// Initialize the adjoining virtual spaces. Then pass the
// a virtual to each generation for initialization of the
// generation.
// Does the actual creation of the virtual spaces
! _virtual_spaces->initialize(max_low_byte_size,
init_low_byte_size,
init_high_byte_size);
// Place the young gen at the high end. Passes in the virtual space.
! _young_gen = new ASPSYoungGen(_virtual_spaces->high(),
! _virtual_spaces->high()->committed_size(),
min_high_byte_size,
! _virtual_spaces->high_byte_size_limit());
// Place the old gen at the low end. Passes in the virtual space.
! _old_gen = new ASPSOldGen(_virtual_spaces->low(),
! _virtual_spaces->low()->committed_size(),
min_low_byte_size,
! _virtual_spaces->low_byte_size_limit(),
"old", 1);
young_gen()->initialize_work();
assert(young_gen()->reserved().byte_size() <= young_gen()->gen_size_limit(),
"Consistency check");
*** 90,101 ****
assert(old_young_rs.size() >= old_gen()->gen_size_limit(),
"Consistency check");
} else {
// Layout the reserved space for the generations.
ReservedSpace old_rs =
! virtual_spaces()->reserved_space().first_part(max_low_byte_size);
ReservedSpace heap_rs =
virtual_spaces()->reserved_space().last_part(max_low_byte_size);
ReservedSpace young_rs = heap_rs.first_part(max_high_byte_size);
assert(young_rs.size() == heap_rs.size(), "Didn't reserve all of the heap");
--- 90,102 ----
assert(old_young_rs.size() >= old_gen()->gen_size_limit(),
"Consistency check");
} else {
// Layout the reserved space for the generations.
+ // If OldGen is allocated on nv-dimm, we need to split the reservation (this is required for windows).
ReservedSpace old_rs =
! virtual_spaces()->reserved_space().first_part(max_low_byte_size, AllocateOldGenAt != NULL /* split */);
ReservedSpace heap_rs =
virtual_spaces()->reserved_space().last_part(max_low_byte_size);
ReservedSpace young_rs = heap_rs.first_part(max_high_byte_size);
assert(young_rs.size() == heap_rs.size(), "Didn't reserve all of the heap");
*** 115,124 ****
--- 116,127 ----
_old_gen->initialize(old_rs, alignment, "old", 1);
assert(old_gen()->gen_size_limit() == old_rs.size(), "Consistency check");
}
}
+ AdjoiningGenerations::AdjoiningGenerations() { }
+
size_t AdjoiningGenerations::reserved_byte_size() {
return virtual_spaces()->reserved_space().size();
}
void log_before_expansion(bool old, size_t expand_in_bytes, size_t change_in_bytes, size_t max_size) {
< prev index next >