equal
deleted
inserted
replaced
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 { |