181 virtual HeapRegion* allocate_new_region(size_t word_size, bool force); |
181 virtual HeapRegion* allocate_new_region(size_t word_size, bool force); |
182 virtual void retire_region(HeapRegion* alloc_region, size_t allocated_bytes); |
182 virtual void retire_region(HeapRegion* alloc_region, size_t allocated_bytes); |
183 public: |
183 public: |
184 OldGCAllocRegion() |
184 OldGCAllocRegion() |
185 : G1AllocRegion("Old GC Alloc Region", true /* bot_updates */) { } |
185 : G1AllocRegion("Old GC Alloc Region", true /* bot_updates */) { } |
|
186 |
|
187 // This specialization of release() makes sure that the last card that has been |
|
188 // allocated into has been completely filled by a dummy object. |
|
189 // This avoids races when remembered set scanning wants to update the BOT of the |
|
190 // last card in the retained old gc alloc region, and allocation threads |
|
191 // allocating into that card at the same time. |
|
192 virtual HeapRegion* release(); |
186 }; |
193 }; |
187 |
194 |
188 // The G1 STW is alive closure. |
195 // The G1 STW is alive closure. |
189 // An instance is embedded into the G1CH and used as the |
196 // An instance is embedded into the G1CH and used as the |
190 // (optional) _is_alive_non_header closure in the STW |
197 // (optional) _is_alive_non_header closure in the STW |