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