Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegion.cpp @ 12233:40136aa2cdb1
8010722: assert: failed: heap size is too big for compressed oops
Summary: Use conservative assumptions of required alignment for the various garbage collector components into account when determining the maximum heap size that supports compressed oops. Using this conservative value avoids several circular dependencies in the calculation.
Reviewed-by: stefank, dholmes
author | tschatzl |
---|---|
date | Wed, 11 Sep 2013 16:25:02 +0200 |
parents | 84683e78e713 |
children | 190899198332 |
comparison
equal
deleted
inserted
replaced
12230:040895ec3920 | 12233: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; |