comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 354:c0f8f7790199

6652160: G1: assert(cur_used_bytes == _g1->recalculate_used(),"It should!") at g1CollectorPolicy.cpp:1425 Summary: In attempt_allocation_slow() wait for the concurrent cleanup to complete before modifying _summary_bytes_used. Reviewed-by: jmasa, apetrusenko
author iveresov
date Wed, 30 Jul 2008 10:45:52 -0700
parents 9bb2c10ac07b
children 0edda524b58c
comparison
equal deleted inserted replaced
353:9bb2c10ac07b 354:c0f8f7790199
646 assert(_cur_alloc_region == NULL 646 assert(_cur_alloc_region == NULL
647 || !_cur_alloc_region->isHumongous(), 647 || !_cur_alloc_region->isHumongous(),
648 "Prevent a regression of this bug."); 648 "Prevent a regression of this bug.");
649 649
650 } else { 650 } else {
651 // We may have concurrent cleanup working at the time. Wait for it
652 // to complete. In the future we would probably want to make the
653 // concurrent cleanup truly concurrent by decoupling it from the
654 // allocation.
655 if (!SafepointSynchronize::is_at_safepoint())
656 wait_for_cleanup_complete();
651 // If we do a collection pause, this will be reset to a non-NULL 657 // If we do a collection pause, this will be reset to a non-NULL
652 // value. If we don't, nulling here ensures that we allocate a new 658 // value. If we don't, nulling here ensures that we allocate a new
653 // region below. 659 // region below.
654 if (_cur_alloc_region != NULL) { 660 if (_cur_alloc_region != NULL) {
655 // We're finished with the _cur_alloc_region. 661 // We're finished with the _cur_alloc_region.