equal
deleted
inserted
replaced
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; |