< prev index next >

src/hotspot/share/gc/g1/g1Arguments.cpp

Print this page


  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "gc/g1/g1Arguments.hpp"
  28 #include "gc/g1/g1CollectedHeap.inline.hpp"
  29 #include "gc/g1/g1HeapVerifier.hpp"
  30 #include "gc/g1/heapRegion.hpp"
  31 #include "gc/g1/heapRegionRemSet.hpp"
  32 #include "gc/shared/cardTableRS.hpp"
  33 #include "gc/shared/gcArguments.hpp"
  34 #include "gc/shared/workerPolicy.hpp"
  35 #include "runtime/globals.hpp"
  36 #include "runtime/globals_extension.hpp"
  37 
  38 static const double MaxRamFractionForYoung = 0.8;
  39 size_t G1Arguments::MaxMemoryForYoung;
  40 
  41 static size_t calculate_heap_alignment(size_t space_alignment) {
  42   size_t card_table_alignment = CardTableRS::ct_max_alignment_constraint();
  43   size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
  44   return MAX3(card_table_alignment, space_alignment, page_size);
  45 }
  46 
  47 void G1Arguments::initialize_alignments() {
  48   // Set up the region size and associated fields.
  49   //
  50   // There is a circular dependency here. We base the region size on the heap
  51   // size, but the heap size should be aligned with the region size. To get
  52   // around this we use the unaligned values for the heap.
  53   HeapRegion::setup_heap_region_size(MaxHeapSize);
  54   HeapRegionRemSet::setup_remset_size();
  55 
  56   SpaceAlignment = HeapRegion::GrainBytes;




  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "gc/g1/g1Arguments.hpp"
  28 #include "gc/g1/g1CollectedHeap.inline.hpp"
  29 #include "gc/g1/g1HeapVerifier.hpp"
  30 #include "gc/g1/heapRegion.hpp"
  31 #include "gc/g1/heapRegionRemSet.hpp"
  32 #include "gc/shared/cardTableRS.hpp"
  33 #include "gc/shared/gcArguments.hpp"
  34 #include "gc/shared/workerPolicy.hpp"
  35 #include "runtime/globals.hpp"

  36 
  37 static const double MaxRamFractionForYoung = 0.8;
  38 size_t G1Arguments::MaxMemoryForYoung;
  39 
  40 static size_t calculate_heap_alignment(size_t space_alignment) {
  41   size_t card_table_alignment = CardTableRS::ct_max_alignment_constraint();
  42   size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
  43   return MAX3(card_table_alignment, space_alignment, page_size);
  44 }
  45 
  46 void G1Arguments::initialize_alignments() {
  47   // Set up the region size and associated fields.
  48   //
  49   // There is a circular dependency here. We base the region size on the heap
  50   // size, but the heap size should be aligned with the region size. To get
  51   // around this we use the unaligned values for the heap.
  52   HeapRegion::setup_heap_region_size(MaxHeapSize);
  53   HeapRegionRemSet::setup_remset_size();
  54 
  55   SpaceAlignment = HeapRegion::GrainBytes;


< prev index next >