< prev index next >
src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
Print this page
*** 3217,3227 ****
HeapWord* aligned_start = sp->bottom();
if (sp->used_region().contains(_restart_addr)) {
// Align down to a card boundary for the start of 0th task
// for this space.
! aligned_start = align_ptr_down(_restart_addr, CardTableModRefBS::card_size);
}
size_t chunk_size = sp->marking_task_size();
while (!pst->is_task_claimed(/* reference */ nth_task)) {
// Having claimed the nth task in this space,
--- 3217,3227 ----
HeapWord* aligned_start = sp->bottom();
if (sp->used_region().contains(_restart_addr)) {
// Align down to a card boundary for the start of 0th task
// for this space.
! aligned_start = align_down(_restart_addr, CardTableModRefBS::card_size);
}
size_t chunk_size = sp->marking_task_size();
while (!pst->is_task_claimed(/* reference */ nth_task)) {
// Having claimed the nth task in this space,
*** 5650,5660 ****
}
bool CMSBitMap::allocate(MemRegion mr) {
_bmStartWord = mr.start();
_bmWordSize = mr.word_size();
! ReservedSpace brs(ReservedSpace::allocation_align_size_up(
(_bmWordSize >> (_shifter + LogBitsPerByte)) + 1));
if (!brs.is_reserved()) {
log_warning(gc)("CMS bit map allocation failure");
return false;
}
--- 5650,5660 ----
}
bool CMSBitMap::allocate(MemRegion mr) {
_bmStartWord = mr.start();
_bmWordSize = mr.word_size();
! ReservedSpace brs(ReservedSpace::allocation_align_up(
(_bmWordSize >> (_shifter + LogBitsPerByte)) + 1));
if (!brs.is_reserved()) {
log_warning(gc)("CMS bit map allocation failure");
return false;
}
*** 5741,5751 ****
#endif
bool CMSMarkStack::allocate(size_t size) {
// allocate a stack of the requisite depth
! ReservedSpace rs(ReservedSpace::allocation_align_size_up(
size * sizeof(oop)));
if (!rs.is_reserved()) {
log_warning(gc)("CMSMarkStack allocation failure");
return false;
}
--- 5741,5751 ----
#endif
bool CMSMarkStack::allocate(size_t size) {
// allocate a stack of the requisite depth
! ReservedSpace rs(ReservedSpace::allocation_align_up(
size * sizeof(oop)));
if (!rs.is_reserved()) {
log_warning(gc)("CMSMarkStack allocation failure");
return false;
}
*** 5780,5790 ****
}
// Double capacity if possible
size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
// Do not give up existing stack until we have managed to
// get the double capacity that we desired.
! ReservedSpace rs(ReservedSpace::allocation_align_size_up(
new_capacity * sizeof(oop)));
if (rs.is_reserved()) {
// Release the backing store associated with old stack
_virtual_space.release();
// Reinitialize virtual space for new stack
--- 5780,5790 ----
}
// Double capacity if possible
size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
// Do not give up existing stack until we have managed to
// get the double capacity that we desired.
! ReservedSpace rs(ReservedSpace::allocation_align_up(
new_capacity * sizeof(oop)));
if (rs.is_reserved()) {
// Release the backing store associated with old stack
_virtual_space.release();
// Reinitialize virtual space for new stack
< prev index next >