src/share/vm/gc_implementation/g1/heapRegion.cpp

changeset 5701
40136aa2cdb1
parent 5646
84683e78e713
child 5784
190899198332
equal deleted inserted replaced
5698:040895ec3920 5701:40136aa2cdb1
1 /* 1 /*
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
146 #define MAX_REGION_SIZE ( 32 * 1024 * 1024 ) 146 #define MAX_REGION_SIZE ( 32 * 1024 * 1024 )
147 147
148 // The automatic region size calculation will try to have around this 148 // The automatic region size calculation will try to have around this
149 // many regions in the heap (based on the min heap size). 149 // many regions in the heap (based on the min heap size).
150 #define TARGET_REGION_NUMBER 2048 150 #define TARGET_REGION_NUMBER 2048
151
152 size_t HeapRegion::max_region_size() {
153 return (size_t)MAX_REGION_SIZE;
154 }
151 155
152 void HeapRegion::setup_heap_region_size(size_t initial_heap_size, size_t max_heap_size) { 156 void HeapRegion::setup_heap_region_size(size_t initial_heap_size, size_t max_heap_size) {
153 uintx region_size = G1HeapRegionSize; 157 uintx region_size = G1HeapRegionSize;
154 if (FLAG_IS_DEFAULT(G1HeapRegionSize)) { 158 if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
155 size_t average_heap_size = (initial_heap_size + max_heap_size) / 2; 159 size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;

mercurial