520 young_gen->to_space()->capacity_in_bytes(),
521 "Sizes of space in young gen are out-of-bounds");
522
523 size_t young_live = young_gen->used_in_bytes();
524 size_t eden_live = young_gen->eden_space()->used_in_bytes();
525 size_t cur_eden = young_gen->eden_space()->capacity_in_bytes();
526 size_t max_old_gen_size = old_gen->max_gen_size();
527 size_t max_eden_size = max_young_size -
528 young_gen->from_space()->capacity_in_bytes() -
529 young_gen->to_space()->capacity_in_bytes();
530
531 // Used for diagnostics
532 size_policy->clear_generation_free_space_flags();
533
534 size_policy->compute_eden_space_size(young_live,
535 eden_live,
536 cur_eden,
537 max_eden_size,
538 false /* not full gc*/);
539
540 size_policy->check_gc_overhead_limit(young_live,
541 eden_live,
542 max_old_gen_size,
543 max_eden_size,
544 false /* not full gc*/,
545 gc_cause,
546 heap->soft_ref_policy());
547
548 size_policy->decay_supplemental_growth(false /* not full gc*/);
549 }
550 // Resize the young generation at every collection
551 // even if new sizes have not been calculated. This is
552 // to allow resizes that may have been inhibited by the
553 // relative location of the "to" and "from" spaces.
554
555 // Resizing the old gen at young collections can cause increases
556 // that don't feed back to the generation sizing policy until
557 // a full collection. Don't resize the old gen here.
558
559 heap->resize_young_gen(size_policy->calculated_eden_size_in_bytes(),
560 size_policy->calculated_survivor_size_in_bytes());
561
|
520 young_gen->to_space()->capacity_in_bytes(),
521 "Sizes of space in young gen are out-of-bounds");
522
523 size_t young_live = young_gen->used_in_bytes();
524 size_t eden_live = young_gen->eden_space()->used_in_bytes();
525 size_t cur_eden = young_gen->eden_space()->capacity_in_bytes();
526 size_t max_old_gen_size = old_gen->max_gen_size();
527 size_t max_eden_size = max_young_size -
528 young_gen->from_space()->capacity_in_bytes() -
529 young_gen->to_space()->capacity_in_bytes();
530
531 // Used for diagnostics
532 size_policy->clear_generation_free_space_flags();
533
534 size_policy->compute_eden_space_size(young_live,
535 eden_live,
536 cur_eden,
537 max_eden_size,
538 false /* not full gc*/);
539
540 size_policy->check_gc_overhead_limit(eden_live,
541 max_old_gen_size,
542 max_eden_size,
543 false /* not full gc*/,
544 gc_cause,
545 heap->soft_ref_policy());
546
547 size_policy->decay_supplemental_growth(false /* not full gc*/);
548 }
549 // Resize the young generation at every collection
550 // even if new sizes have not been calculated. This is
551 // to allow resizes that may have been inhibited by the
552 // relative location of the "to" and "from" spaces.
553
554 // Resizing the old gen at young collections can cause increases
555 // that don't feed back to the generation sizing policy until
556 // a full collection. Don't resize the old gen here.
557
558 heap->resize_young_gen(size_policy->calculated_eden_size_in_bytes(),
559 size_policy->calculated_survivor_size_in_bytes());
560
|