< prev index next >
src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegionSet.hpp
Print this page
rev 9485 : [backport] Replace ShHeapRegionSet::get with get_fast
rev 9538 : [backport] Ensure collection set and cset map are consistent
@@ -51,30 +51,30 @@
class ShenandoahHeapRegionSet: public CHeapObj<mtGC> {
protected:
ShenandoahHeapRegion** _regions;
size_t _active_end;
size_t _reserved_end;
- size_t _current_index;
+ volatile size_t _current_index;
public:
ShenandoahHeapRegionSet(size_t max_regions);
virtual ~ShenandoahHeapRegionSet();
- size_t max_regions() { return _reserved_end;}
- size_t active_regions() { return _active_end;}
+ size_t max_regions() const { return _reserved_end;}
+ size_t active_regions() const { return _active_end;}
HeapWord* bottom() const;
HeapWord* end() const;
void clear();
size_t count() const;
- ShenandoahHeapRegion* get(size_t i) const;
- inline ShenandoahHeapRegion* get_fast(size_t i) const {
+ ShenandoahHeapRegion* get_or_null(size_t i) const;
+ inline ShenandoahHeapRegion* get(size_t i) const {
assert (i < _active_end, "sanity");
return _regions[i];
}
virtual void add_region(ShenandoahHeapRegion* r);
< prev index next >