< prev index next >

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

Print this page

        

@@ -242,14 +242,14 @@
 // Action_verify - BOT verification.
 void
 BlockOffsetArray::do_block_internal(HeapWord* blk_start,
                                     HeapWord* blk_end,
                                     Action action, bool reducing) {
-  assert(_sp->is_in_reserved(blk_start),
-         "reference must be into the space");
-  assert(_sp->is_in_reserved(blk_end-1),
-         "limit must be within the space");
+  assert(Universe::heap()->is_in_reserved(blk_start),
+         "reference must be into the heap");
+  assert(Universe::heap()->is_in_reserved(blk_end-1),
+         "limit must be within the heap");
   // This is optimized to make the test fast, assuming we only rarely
   // cross boundaries.
   uintptr_t end_ui = (uintptr_t)(blk_end - 1);
   uintptr_t start_ui = (uintptr_t)blk_start;
   // Calculate the last card boundary preceding end of blk

@@ -716,14 +716,14 @@
          "should be past threshold");
   assert(blk_start <= _next_offset_threshold,
          "blk_start should be at or before threshold");
   assert(pointer_delta(_next_offset_threshold, blk_start) <= BOTConstants::N_words,
          "offset should be <= BlockOffsetSharedArray::N");
-  assert(_sp->is_in_reserved(blk_start),
-         "reference must be into the space");
-  assert(_sp->is_in_reserved(blk_end-1),
-         "limit must be within the space");
+  assert(Universe::heap()->is_in_reserved(blk_start),
+         "reference must be into the heap");
+  assert(Universe::heap()->is_in_reserved(blk_end-1),
+         "limit must be within the heap");
   assert(_next_offset_threshold ==
          _array->_reserved.start() + _next_offset_index*BOTConstants::N_words,
          "index must agree with threshold");
 
   debug_only(size_t orig_next_offset_index = _next_offset_index;)

@@ -773,18 +773,22 @@
   }
 #endif
 }
 
 HeapWord* BlockOffsetArrayContigSpace::initialize_threshold() {
+  assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
+         "just checking");
   _next_offset_index = _array->index_for(_bottom);
   _next_offset_index++;
   _next_offset_threshold =
     _array->address_for_index(_next_offset_index);
   return _next_offset_threshold;
 }
 
 void BlockOffsetArrayContigSpace::zero_bottom_entry() {
+  assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
+         "just checking");
   size_t bottom_index = _array->index_for(_bottom);
   _array->set_offset_array(bottom_index, 0);
 }
 
 size_t BlockOffsetArrayContigSpace::last_active_index() const {
< prev index next >