3379 |
3379 |
3380 bool ConcurrentMarkSweepGeneration::grow_by(size_t bytes) { |
3380 bool ConcurrentMarkSweepGeneration::grow_by(size_t bytes) { |
3381 assert_locked_or_safepoint(Heap_lock); |
3381 assert_locked_or_safepoint(Heap_lock); |
3382 bool result = _virtual_space.expand_by(bytes); |
3382 bool result = _virtual_space.expand_by(bytes); |
3383 if (result) { |
3383 if (result) { |
3384 HeapWord* old_end = _cmsSpace->end(); |
|
3385 size_t new_word_size = |
3384 size_t new_word_size = |
3386 heap_word_size(_virtual_space.committed_size()); |
3385 heap_word_size(_virtual_space.committed_size()); |
3387 MemRegion mr(_cmsSpace->bottom(), new_word_size); |
3386 MemRegion mr(_cmsSpace->bottom(), new_word_size); |
3388 _bts->resize(new_word_size); // resize the block offset shared array |
3387 _bts->resize(new_word_size); // resize the block offset shared array |
3389 Universe::heap()->barrier_set()->resize_covered_region(mr); |
3388 Universe::heap()->barrier_set()->resize_covered_region(mr); |