< prev index next >

src/share/vm/gc/shared/blockOffsetTable.inline.hpp

Print this page

        

*** 47,64 **** char* pc = (char*)p; assert(pc >= (char*)_reserved.start() && pc < (char*)_reserved.end(), "p not in range."); size_t delta = pointer_delta(pc, _reserved.start(), sizeof(char)); ! size_t result = delta >> LogN; assert(result < _vs.committed_size(), "bad index from address"); return result; } inline HeapWord* BlockOffsetSharedArray::address_for_index(size_t index) const { assert(index < _vs.committed_size(), "bad index"); ! HeapWord* result = _reserved.start() + (index << LogN_words); assert(result >= _reserved.start() && result < _reserved.end(), "bad address from index"); return result; } --- 47,64 ---- char* pc = (char*)p; assert(pc >= (char*)_reserved.start() && pc < (char*)_reserved.end(), "p not in range."); size_t delta = pointer_delta(pc, _reserved.start(), sizeof(char)); ! size_t result = delta >> BOTConstants::LogN; assert(result < _vs.committed_size(), "bad index from address"); return result; } inline HeapWord* BlockOffsetSharedArray::address_for_index(size_t index) const { assert(index < _vs.committed_size(), "bad index"); ! HeapWord* result = _reserved.start() + (index << BOTConstants::LogN_words); assert(result >= _reserved.start() && result < _reserved.end(), "bad address from index"); return result; }
< prev index next >