size_t PSAdaptiveSizePolicy::calculated_old_free_size_in_bytes() const {
  size_t free_size = (size_t)(_promo_size + avg_promoted()->padded_average());
  size_t live = ParallelScavengeHeap::heap()->old_gen()->used_in_bytes();

  if (MinHeapFreeRatio != 0) {
    size_t min_free = calculate_free_based_on_live(live, MinHeapFreeRatio);
    free_size = MAX2(free_size, min_free);
  }

  if (MaxHeapFreeRatio != 100) {
    size_t max_free = calculate_free_based_on_live(live, MaxHeapFreeRatio);
    free_size = MIN2(max_free, free_size);
  }

  return free_size;
}
Exemplo n.º 2
0
 size_t padded_average_promoted_in_bytes() const {
   return (size_t)avg_promoted()->padded_average();
 }
Exemplo n.º 3
0
 size_t calculated_old_free_size_in_bytes() const {
   return (size_t)(_promo_size + avg_promoted()->padded_average());
 }