mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8242901: Duplicate PSYoung/OldGen max size functions
Use (nonvirtual) min/max_gen_size consistently, and remove duplicates. Reviewed-by: stefank, sjohanss
This commit is contained in:
parent
168cdcf65d
commit
659aa08fbc
10 changed files with 68 additions and 79 deletions
|
@ -1864,7 +1864,7 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
|
|||
}
|
||||
|
||||
// Calculate optimal free space amounts
|
||||
assert(young_gen->max_size() >
|
||||
assert(young_gen->max_gen_size() >
|
||||
young_gen->from_space()->capacity_in_bytes() +
|
||||
young_gen->to_space()->capacity_in_bytes(),
|
||||
"Sizes of space in young gen are out-of-bounds");
|
||||
|
@ -1874,7 +1874,7 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
|
|||
size_t old_live = old_gen->used_in_bytes();
|
||||
size_t cur_eden = young_gen->eden_space()->capacity_in_bytes();
|
||||
size_t max_old_gen_size = old_gen->max_gen_size();
|
||||
size_t max_eden_size = young_gen->max_size() -
|
||||
size_t max_eden_size = young_gen->max_gen_size() -
|
||||
young_gen->from_space()->capacity_in_bytes() -
|
||||
young_gen->to_space()->capacity_in_bytes();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue