1.1 --- a/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp Tue Aug 19 10:50:27 2014 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp Thu Aug 21 11:47:10 2014 +0200 1.3 @@ -33,7 +33,7 @@ 1.4 G1HotCardCache::G1HotCardCache(G1CollectedHeap *g1h): 1.5 _g1h(g1h), _hot_cache(NULL), _use_cache(false), _card_counts(g1h) {} 1.6 1.7 -void G1HotCardCache::initialize() { 1.8 +void G1HotCardCache::initialize(G1RegionToSpaceMapper* card_counts_storage) { 1.9 if (default_use_cache()) { 1.10 _use_cache = true; 1.11 1.12 @@ -49,7 +49,7 @@ 1.13 _hot_cache_par_chunk_size = MAX2(1, _hot_cache_size / (int)n_workers); 1.14 _hot_cache_par_claimed_idx = 0; 1.15 1.16 - _card_counts.initialize(); 1.17 + _card_counts.initialize(card_counts_storage); 1.18 } 1.19 } 1.20 1.21 @@ -135,11 +135,8 @@ 1.22 // above, are discarded prior to re-enabling the cache near the end of the GC. 1.23 } 1.24 1.25 -void G1HotCardCache::resize_card_counts(size_t heap_capacity) { 1.26 - _card_counts.resize(heap_capacity); 1.27 -} 1.28 - 1.29 void G1HotCardCache::reset_card_counts(HeapRegion* hr) { 1.30 + assert(!hr->isHumongous(), "Should have been cleared"); 1.31 _card_counts.clear_region(hr); 1.32 } 1.33