< prev index next >

src/share/vm/gc/shared/cardGeneration.cpp

Print this page

        

*** 206,217 **** const size_t capacity_after_gc = capacity(); const double min_tmp = used_after_gc / maximum_used_percentage; size_t minimum_desired_capacity = (size_t)MIN2(min_tmp, double(max_uintx)); // Don't shrink less than the initial generation size ! minimum_desired_capacity = MAX2(minimum_desired_capacity, ! spec()->init_size()); assert(used_after_gc <= minimum_desired_capacity, "sanity check"); if (PrintGC && Verbose) { const size_t free_after_gc = free(); const double free_percentage = ((double)free_after_gc) / capacity_after_gc; --- 206,216 ---- const size_t capacity_after_gc = capacity(); const double min_tmp = used_after_gc / maximum_used_percentage; size_t minimum_desired_capacity = (size_t)MIN2(min_tmp, double(max_uintx)); // Don't shrink less than the initial generation size ! minimum_desired_capacity = MAX2(minimum_desired_capacity, initial_size()); assert(used_after_gc <= minimum_desired_capacity, "sanity check"); if (PrintGC && Verbose) { const size_t free_after_gc = free(); const double free_percentage = ((double)free_after_gc) / capacity_after_gc;
*** 260,271 **** if (MaxHeapFreeRatio < 100) { const double maximum_free_percentage = MaxHeapFreeRatio / 100.0; const double minimum_used_percentage = 1.0 - maximum_free_percentage; const double max_tmp = used_after_gc / minimum_used_percentage; size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx)); ! maximum_desired_capacity = MAX2(maximum_desired_capacity, ! spec()->init_size()); if (PrintGC && Verbose) { gclog_or_tty->print_cr(" " " maximum_free_percentage: %6.2f" " minimum_used_percentage: %6.2f", maximum_free_percentage, --- 259,269 ---- if (MaxHeapFreeRatio < 100) { const double maximum_free_percentage = MaxHeapFreeRatio / 100.0; const double minimum_used_percentage = 1.0 - maximum_free_percentage; const double max_tmp = used_after_gc / minimum_used_percentage; size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx)); ! maximum_desired_capacity = MAX2(maximum_desired_capacity, initial_size()); if (PrintGC && Verbose) { gclog_or_tty->print_cr(" " " maximum_free_percentage: %6.2f" " minimum_used_percentage: %6.2f", maximum_free_percentage,
*** 297,320 **** } else { _shrink_factor = MIN2(current_shrink_factor * 4, (size_t) 100); } if (PrintGC && Verbose) { gclog_or_tty->print_cr(" " ! " shrinking:" ! " initSize: %.1fK" ! " maximum_desired_capacity: %.1fK", ! spec()->init_size() / (double) K, ! maximum_desired_capacity / (double) K); gclog_or_tty->print_cr(" " ! " shrink_bytes: %.1fK" ! " current_shrink_factor: " SIZE_FORMAT ! " new shrink factor: " SIZE_FORMAT ! " _min_heap_delta_bytes: %.1fK", ! shrink_bytes / (double) K, ! current_shrink_factor, ! _shrink_factor, ! _min_heap_delta_bytes / (double) K); } } } if (capacity_after_gc > _capacity_at_prologue) { --- 295,318 ---- } else { _shrink_factor = MIN2(current_shrink_factor * 4, (size_t) 100); } if (PrintGC && Verbose) { gclog_or_tty->print_cr(" " ! " shrinking:" ! " initSize: %.1fK" ! " maximum_desired_capacity: %.1fK", ! initial_size() / (double) K, ! maximum_desired_capacity / (double) K); gclog_or_tty->print_cr(" " ! " shrink_bytes: %.1fK" ! " current_shrink_factor: " SIZE_FORMAT ! " new shrink factor: " SIZE_FORMAT ! " _min_heap_delta_bytes: %.1fK", ! shrink_bytes / (double) K, ! current_shrink_factor, ! _shrink_factor, ! _min_heap_delta_bytes / (double) K); } } } if (capacity_after_gc > _capacity_at_prologue) {
< prev index next >