< prev index next >
src/share/vm/memory/cardGeneration.cpp
Print this page
rev 8070 : imported patch gencollected_heap_cleanup
*** 58,68 ****
// Verify that the start and end of this generation is the start of a card.
// If this wasn't true, a single card could span more than on generation,
// which would cause problems when we commit/uncommit memory, and when we
// clear and dirty cards.
guarantee(_rs->is_aligned(reserved_mr.start()), "generation must be card aligned");
! if (reserved_mr.end() != Universe::heap()->reserved_region().end()) {
// Don't check at the very end of the heap as we'll assert that we're probing off
// the end if we try.
guarantee(_rs->is_aligned(reserved_mr.end()), "generation must be card aligned");
}
_min_heap_delta_bytes = MinHeapDeltaBytes;
--- 58,68 ----
// Verify that the start and end of this generation is the start of a card.
// If this wasn't true, a single card could span more than on generation,
// which would cause problems when we commit/uncommit memory, and when we
// clear and dirty cards.
guarantee(_rs->is_aligned(reserved_mr.start()), "generation must be card aligned");
! if (reserved_mr.end() != GenCollectedHeap::heap()->reserved_region().end()) {
// Don't check at the very end of the heap as we'll assert that we're probing off
// the end if we try.
guarantee(_rs->is_aligned(reserved_mr.end()), "generation must be card aligned");
}
_min_heap_delta_bytes = MinHeapDeltaBytes;
*** 76,86 ****
if (result) {
size_t new_word_size =
heap_word_size(_virtual_space.committed_size());
MemRegion mr(space()->bottom(), new_word_size);
// Expand card table
! Universe::heap()->barrier_set()->resize_covered_region(mr);
// Expand shared block offset array
_bts->resize(new_word_size);
// Fix for bug #4668531
if (ZapUnusedHeapArea) {
--- 76,86 ----
if (result) {
size_t new_word_size =
heap_word_size(_virtual_space.committed_size());
MemRegion mr(space()->bottom(), new_word_size);
// Expand card table
! GenCollectedHeap::heap()->barrier_set()->resize_covered_region(mr);
// Expand shared block offset array
_bts->resize(new_word_size);
// Fix for bug #4668531
if (ZapUnusedHeapArea) {
*** 168,178 ****
size_t new_word_size = heap_word_size(space()->capacity());
// Shrink the shared block offset array
_bts->resize(new_word_size);
MemRegion mr(space()->bottom(), new_word_size);
// Shrink the card table
! Universe::heap()->barrier_set()->resize_covered_region(mr);
if (Verbose && PrintGC) {
size_t new_mem_size = _virtual_space.committed_size();
size_t old_mem_size = new_mem_size + size;
gclog_or_tty->print_cr("Shrinking %s from " SIZE_FORMAT "K to " SIZE_FORMAT "K",
--- 168,178 ----
size_t new_word_size = heap_word_size(space()->capacity());
// Shrink the shared block offset array
_bts->resize(new_word_size);
MemRegion mr(space()->bottom(), new_word_size);
// Shrink the card table
! GenCollectedHeap::heap()->barrier_set()->resize_covered_region(mr);
if (Verbose && PrintGC) {
size_t new_mem_size = _virtual_space.committed_size();
size_t old_mem_size = new_mem_size + size;
gclog_or_tty->print_cr("Shrinking %s from " SIZE_FORMAT "K to " SIZE_FORMAT "K",
< prev index next >