comparison src/share/vm/gc_implementation/g1/g1HotCardCache.hpp @ 20337:1f1d373cd044

8038423: G1: Decommit memory within heap Summary: Allow G1 to decommit memory of arbitrary regions within the heap and their associated auxiliary data structures card table, BOT, hot card cache, and mark bitmaps. Reviewed-by: mgerdin, brutisso, jwilhelm
author tschatzl
date Thu, 21 Aug 2014 11:47:10 +0200
parents 8847586c9037
children
comparison
equal deleted inserted replaced
20336:6701abbc4441 20337:1f1d373cd044
76 76
77 public: 77 public:
78 G1HotCardCache(G1CollectedHeap* g1h); 78 G1HotCardCache(G1CollectedHeap* g1h);
79 ~G1HotCardCache(); 79 ~G1HotCardCache();
80 80
81 void initialize(); 81 void initialize(G1RegionToSpaceMapper* card_counts_storage);
82 82
83 bool use_cache() { return _use_cache; } 83 bool use_cache() { return _use_cache; }
84 84
85 void set_use_cache(bool b) { 85 void set_use_cache(bool b) {
86 _use_cache = (b ? default_use_cache() : false); 86 _use_cache = (b ? default_use_cache() : false);
113 _hot_cache_idx = 0; _n_hot = 0; 113 _hot_cache_idx = 0; _n_hot = 0;
114 } 114 }
115 115
116 bool hot_cache_is_empty() { return _n_hot == 0; } 116 bool hot_cache_is_empty() { return _n_hot == 0; }
117 117
118 // Resizes the card counts table to match the given capacity
119 void resize_card_counts(size_t heap_capacity);
120
121 // Zeros the values in the card counts table for entire committed heap 118 // Zeros the values in the card counts table for entire committed heap
122 void reset_card_counts(); 119 void reset_card_counts();
123 120
124 // Zeros the values in the card counts table for the given region 121 // Zeros the values in the card counts table for the given region
125 void reset_card_counts(HeapRegion* hr); 122 void reset_card_counts(HeapRegion* hr);