< prev index next >

src/share/vm/memory/blockOffsetTable.cpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.


 776 
 777 HeapWord* BlockOffsetArrayContigSpace::initialize_threshold() {
 778   assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
 779          "just checking");
 780   _next_offset_index = _array->index_for(_bottom);
 781   _next_offset_index++;
 782   _next_offset_threshold =
 783     _array->address_for_index(_next_offset_index);
 784   return _next_offset_threshold;
 785 }
 786 
 787 void BlockOffsetArrayContigSpace::zero_bottom_entry() {
 788   assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
 789          "just checking");
 790   size_t bottom_index = _array->index_for(_bottom);
 791   _array->set_offset_array(bottom_index, 0);
 792 }
 793 
 794 size_t BlockOffsetArrayContigSpace::last_active_index() const {
 795   size_t result = _next_offset_index - 1;
 796   return result >= 0 ? result : 0;
 797 }


 776 
 777 HeapWord* BlockOffsetArrayContigSpace::initialize_threshold() {
 778   assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
 779          "just checking");
 780   _next_offset_index = _array->index_for(_bottom);
 781   _next_offset_index++;
 782   _next_offset_threshold =
 783     _array->address_for_index(_next_offset_index);
 784   return _next_offset_threshold;
 785 }
 786 
 787 void BlockOffsetArrayContigSpace::zero_bottom_entry() {
 788   assert(!Universe::heap()->is_in_reserved(_array->_offset_array),
 789          "just checking");
 790   size_t bottom_index = _array->index_for(_bottom);
 791   _array->set_offset_array(bottom_index, 0);
 792 }
 793 
 794 size_t BlockOffsetArrayContigSpace::last_active_index() const {
 795   size_t result = _next_offset_index - 1;
 796   return ((intptr_t)result) >= 0 ? result : 0;
 797 }
< prev index next >