Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 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 | 96b1c2e06e25 |
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. |
352 | 352 |
353 static size_t align_up_to_region_byte_size(size_t sz) { | 353 static size_t align_up_to_region_byte_size(size_t sz) { |
354 return (sz + (size_t) GrainBytes - 1) & | 354 return (sz + (size_t) GrainBytes - 1) & |
355 ~((1 << (size_t) LogOfHRGrainBytes) - 1); | 355 ~((1 << (size_t) LogOfHRGrainBytes) - 1); |
356 } | 356 } |
357 | |
358 static size_t max_region_size(); | |
357 | 359 |
358 // It sets up the heap region size (GrainBytes / GrainWords), as | 360 // It sets up the heap region size (GrainBytes / GrainWords), as |
359 // well as other related fields that are based on the heap region | 361 // well as other related fields that are based on the heap region |
360 // size (LogOfHRGrainBytes / LogOfHRGrainWords / | 362 // size (LogOfHRGrainBytes / LogOfHRGrainWords / |
361 // CardsPerRegion). All those fields are considered constant | 363 // CardsPerRegion). All those fields are considered constant |