comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 14313:44315152d434

8028391: Make the Min/MaxHeapFreeRatio flags manageable Summary: Made the flags Min- and MaxHeapFreeRatio manageable, and implemented support for these flags in ParallalGC. Reviewed-by: sla, mgerdin, brutisso
author jwilhelm
date Wed, 29 Jan 2014 23:17:05 +0100
parents 1e1c8d358b52
children 2edf6f3e191d
comparison
equal deleted inserted replaced
14312:73b1030c6253 14313:44315152d434
1573 1573
1574 // This code is mostly copied from TenuredGeneration. 1574 // This code is mostly copied from TenuredGeneration.
1575 void 1575 void
1576 G1CollectedHeap:: 1576 G1CollectedHeap::
1577 resize_if_necessary_after_full_collection(size_t word_size) { 1577 resize_if_necessary_after_full_collection(size_t word_size) {
1578 assert(MinHeapFreeRatio <= MaxHeapFreeRatio, "sanity check");
1579
1580 // Include the current allocation, if any, and bytes that will be 1578 // Include the current allocation, if any, and bytes that will be
1581 // pre-allocated to support collections, as "used". 1579 // pre-allocated to support collections, as "used".
1582 const size_t used_after_gc = used(); 1580 const size_t used_after_gc = used();
1583 const size_t capacity_after_gc = capacity(); 1581 const size_t capacity_after_gc = capacity();
1584 const size_t free_after_gc = capacity_after_gc - used_after_gc; 1582 const size_t free_after_gc = capacity_after_gc - used_after_gc;