hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.inline.hpp
changeset 24424 2658d7834c6e
parent 24106 dae9277bdf2a
child 26157 70eddb655686
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    28 #include "gc_implementation/g1/heapRegion.hpp"
    28 #include "gc_implementation/g1/heapRegion.hpp"
    29 #include "gc_implementation/g1/heapRegionSeq.hpp"
    29 #include "gc_implementation/g1/heapRegionSeq.hpp"
    30 
    30 
    31 inline HeapRegion* HeapRegionSeq::addr_to_region(HeapWord* addr) const {
    31 inline HeapRegion* HeapRegionSeq::addr_to_region(HeapWord* addr) const {
    32   assert(addr < heap_end(),
    32   assert(addr < heap_end(),
    33         err_msg("addr: "PTR_FORMAT" end: "PTR_FORMAT, addr, heap_end()));
    33         err_msg("addr: "PTR_FORMAT" end: "PTR_FORMAT, p2i(addr), p2i(heap_end())));
    34   assert(addr >= heap_bottom(),
    34   assert(addr >= heap_bottom(),
    35         err_msg("addr: "PTR_FORMAT" bottom: "PTR_FORMAT, addr, heap_bottom()));
    35         err_msg("addr: "PTR_FORMAT" bottom: "PTR_FORMAT, p2i(addr), p2i(heap_bottom())));
    36 
    36 
    37   HeapRegion* hr = _regions.get_by_address(addr);
    37   HeapRegion* hr = _regions.get_by_address(addr);
    38   assert(hr != NULL, "invariant");
    38   assert(hr != NULL, "invariant");
    39   return hr;
    39   return hr;
    40 }
    40 }