< prev index next >
src/hotspot/share/gc/g1/g1HeapSizingPolicy.cpp
Print this page
rev 57998 : [mq]: softmaxheapsize2
*** 62,73 ****
size_t expand_bytes = 0;
// If the heap is at less than half its maximum size, scale the threshold down,
// to a limit of 1. Thus the smaller the heap is, the more likely it is to expand,
// though the scaling code will likely keep the increase small.
! if (_g1h->capacity() <= _g1h->max_capacity() / 2) {
! threshold *= (double)_g1h->capacity() / (double)(_g1h->max_capacity() / 2);
threshold = MAX2(threshold, 1.0);
}
// If the last GC time ratio is over the threshold, increment the count of
// times it has been exceeded, and add this ratio to the sum of exceeded
--- 62,73 ----
size_t expand_bytes = 0;
// If the heap is at less than half its maximum size, scale the threshold down,
// to a limit of 1. Thus the smaller the heap is, the more likely it is to expand,
// though the scaling code will likely keep the increase small.
! if (_g1h->capacity() <= _g1h->soft_max_capacity() / 2) {
! threshold *= (double)_g1h->capacity() / (double)(_g1h->soft_max_capacity() / 2);
threshold = MAX2(threshold, 1.0);
}
// If the last GC time ratio is over the threshold, increment the count of
// times it has been exceeded, and add this ratio to the sum of exceeded
< prev index next >