hotspot/src/share/vm/gc/parallel/cardTableExtension.cpp
changeset 46619 a3919f5e8d2b
parent 46618 d503911aa948
child 46625 edefffab74e2
equal deleted inserted replaced
46618:d503911aa948 46619:a3919f5e8d2b
   502         MemRegion(min_prev_start, cur_committed.end());
   502         MemRegion(min_prev_start, cur_committed.end());
   503     cur_committed = new_committed;
   503     cur_committed = new_committed;
   504   }
   504   }
   505 #ifdef ASSERT
   505 #ifdef ASSERT
   506   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
   506   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
   507   assert(cur_committed.start() == align_ptr_up(cur_committed.start(), os::vm_page_size()),
   507   assert(cur_committed.start() == align_up(cur_committed.start(), os::vm_page_size()),
   508     "Starts should have proper alignment");
   508     "Starts should have proper alignment");
   509 #endif
   509 #endif
   510 
   510 
   511   jbyte* new_start = byte_for(new_region.start());
   511   jbyte* new_start = byte_for(new_region.start());
   512   // Round down because this is for the start address
   512   // Round down because this is for the start address
   513   HeapWord* new_start_aligned =
   513   HeapWord* new_start_aligned =
   514     (HeapWord*)align_size_down((uintptr_t)new_start, os::vm_page_size());
   514     (HeapWord*)align_down((uintptr_t)new_start, os::vm_page_size());
   515   // The guard page is always committed and should not be committed over.
   515   // The guard page is always committed and should not be committed over.
   516   // This method is used in cases where the generation is growing toward
   516   // This method is used in cases where the generation is growing toward
   517   // lower addresses but the guard region is still at the end of the
   517   // lower addresses but the guard region is still at the end of the
   518   // card table.  That still makes sense when looking for writes
   518   // card table.  That still makes sense when looking for writes
   519   // off the end of the card table.
   519   // off the end of the card table.
   582                                                        MemRegion new_region) {
   582                                                        MemRegion new_region) {
   583 
   583 
   584   jbyte* new_start = byte_for(new_region.start());
   584   jbyte* new_start = byte_for(new_region.start());
   585   // Set the new start of the committed region
   585   // Set the new start of the committed region
   586   HeapWord* new_start_aligned =
   586   HeapWord* new_start_aligned =
   587     (HeapWord*)align_ptr_down(new_start, os::vm_page_size());
   587     (HeapWord*)align_down(new_start, os::vm_page_size());
   588   MemRegion new_committed = MemRegion(new_start_aligned,
   588   MemRegion new_committed = MemRegion(new_start_aligned,
   589     _committed[changed_region].end());
   589     _committed[changed_region].end());
   590   _committed[changed_region] = new_committed;
   590   _committed[changed_region] = new_committed;
   591   _committed[changed_region].set_start(new_start_aligned);
   591   _committed[changed_region].set_start(new_start_aligned);
   592 }
   592 }