< prev index next >

src/hotspot/share/gc/shared/markBitMap.cpp

Print this page




  45   _bm = BitMapView((BitMap::bm_word_t*) storage.start(), _covered.word_size() >> _shifter);
  46 }
  47 
  48 void MarkBitMap::do_clear(MemRegion mr, bool large) {
  49   MemRegion intersection = mr.intersection(_covered);
  50   assert(!intersection.is_empty(),
  51          "Given range from " PTR_FORMAT " to " PTR_FORMAT " is completely outside the heap",
  52          p2i(mr.start()), p2i(mr.end()));
  53   // convert address range into offset range
  54   size_t beg = addr_to_offset(intersection.start());
  55   size_t end = addr_to_offset(intersection.end());
  56   if (large) {
  57     _bm.clear_large_range(beg, end);
  58   } else {
  59     _bm.clear_range(beg, end);
  60   }
  61 }
  62 
  63 #ifdef ASSERT
  64 void MarkBitMap::check_mark(HeapWord* addr) {
  65   assert(Universe::heap()->is_in(addr),
  66          "Trying to access bitmap " PTR_FORMAT " for address " PTR_FORMAT " not in the heap.",
  67          p2i(this), p2i(addr));
  68 }
  69 #endif


  45   _bm = BitMapView((BitMap::bm_word_t*) storage.start(), _covered.word_size() >> _shifter);
  46 }
  47 
  48 void MarkBitMap::do_clear(MemRegion mr, bool large) {
  49   MemRegion intersection = mr.intersection(_covered);
  50   assert(!intersection.is_empty(),
  51          "Given range from " PTR_FORMAT " to " PTR_FORMAT " is completely outside the heap",
  52          p2i(mr.start()), p2i(mr.end()));
  53   // convert address range into offset range
  54   size_t beg = addr_to_offset(intersection.start());
  55   size_t end = addr_to_offset(intersection.end());
  56   if (large) {
  57     _bm.clear_large_range(beg, end);
  58   } else {
  59     _bm.clear_range(beg, end);
  60   }
  61 }
  62 
  63 #ifdef ASSERT
  64 void MarkBitMap::check_mark(HeapWord* addr) {
  65   assert(Universe::heap()->is_in_reserved(addr),
  66          "Trying to access bitmap " PTR_FORMAT " for address " PTR_FORMAT " not in the heap.",
  67          p2i(this), p2i(addr));
  68 }
  69 #endif
< prev index next >