src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp

changeset 4300
2fc0334f613a
parent 4037
da91efe96a93
child 6680
78bbf4d43a14
     1.1 --- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp	Tue Nov 27 14:20:21 2012 +0100
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp	Tue Nov 27 14:11:37 2012 -0800
     1.3 @@ -49,16 +49,17 @@
     1.4    char* pc = (char*)p;
     1.5    assert(pc >= (char*)_reserved.start() &&
     1.6           pc <  (char*)_reserved.end(),
     1.7 -         "p not in range.");
     1.8 +         err_msg("p (" PTR_FORMAT ") not in reserved [" PTR_FORMAT ", " PTR_FORMAT ")",
     1.9 +                 p, (char*)_reserved.start(), (char*)_reserved.end()));
    1.10    size_t delta = pointer_delta(pc, _reserved.start(), sizeof(char));
    1.11    size_t result = delta >> LogN;
    1.12 -  assert(result < _vs.committed_size(), "bad index from address");
    1.13 +  check_index(result, "bad index from address");
    1.14    return result;
    1.15  }
    1.16  
    1.17  inline HeapWord*
    1.18  G1BlockOffsetSharedArray::address_for_index(size_t index) const {
    1.19 -  assert(index < _vs.committed_size(), "bad index");
    1.20 +  check_index(index, "index out of range");
    1.21    HeapWord* result = _reserved.start() + (index << LogN_words);
    1.22    assert(result >= _reserved.start() && result < _reserved.end(),
    1.23           err_msg("bad address from index result " PTR_FORMAT

mercurial