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

changeset 2504
c33825b68624
parent 2314
f95d63e2154a
child 2646
04d1138b4cce
equal deleted inserted replaced
2503:986b2844f7a2 2504:c33825b68624
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2011, 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.
97 97
98 void ConcurrentG1Refine::init() { 98 void ConcurrentG1Refine::init() {
99 if (G1ConcRSLogCacheSize > 0) { 99 if (G1ConcRSLogCacheSize > 0) {
100 _g1h = G1CollectedHeap::heap(); 100 _g1h = G1CollectedHeap::heap();
101 _max_n_card_counts = 101 _max_n_card_counts =
102 (unsigned) (_g1h->g1_reserved_obj_bytes() >> CardTableModRefBS::card_shift); 102 (unsigned) (_g1h->max_capacity() >> CardTableModRefBS::card_shift);
103 103
104 size_t max_card_num = ((size_t)1 << (sizeof(unsigned)*BitsPerByte-1)) - 1; 104 size_t max_card_num = ((size_t)1 << (sizeof(unsigned)*BitsPerByte-1)) - 1;
105 guarantee(_max_n_card_counts < max_card_num, "card_num representation"); 105 guarantee(_max_n_card_counts < max_card_num, "card_num representation");
106 106
107 int desired = _max_n_card_counts / InitialCacheFraction; 107 int desired = _max_n_card_counts / InitialCacheFraction;

mercurial