src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp
changeset 59249 29b0d0b61615
parent 58730 ca620b06b5c9
child 59252 623722a6aeb9
equal deleted inserted replaced
59248:e92153ed8bdc 59249:29b0d0b61615
    47 #include "utilities/copy.hpp"
    47 #include "utilities/copy.hpp"
    48 #include "utilities/globalDefinitions.hpp"
    48 #include "utilities/globalDefinitions.hpp"
    49 
    49 
    50 
    50 
    51 inline ShenandoahHeapRegion* ShenandoahRegionIterator::next() {
    51 inline ShenandoahHeapRegion* ShenandoahRegionIterator::next() {
    52   size_t new_index = Atomic::add((size_t) 1, &_index);
    52   size_t new_index = Atomic::add(&_index, (size_t) 1);
    53   // get_region() provides the bounds-check and returns NULL on OOB.
    53   // get_region() provides the bounds-check and returns NULL on OOB.
    54   return _heap->get_region(new_index - 1);
    54   return _heap->get_region(new_index - 1);
    55 }
    55 }
    56 
    56 
    57 inline bool ShenandoahHeap::has_forwarded_objects() const {
    57 inline bool ShenandoahHeap::has_forwarded_objects() const {