@@ -620,12 +620,11 @@ void ShenandoahHeap::post_initialize() {
620
620
}
621
621
622
622
size_t ShenandoahHeap::used () const {
623
- return Atomic::load_acquire (&_used);
623
+ return Atomic::load (&_used);
624
624
}
625
625
626
626
size_t ShenandoahHeap::committed () const {
627
- OrderAccess::acquire ();
628
- return _committed;
627
+ return Atomic::load (&_committed);
629
628
}
630
629
631
630
void ShenandoahHeap::increase_committed (size_t bytes) {
@@ -639,20 +638,20 @@ void ShenandoahHeap::decrease_committed(size_t bytes) {
639
638
}
640
639
641
640
void ShenandoahHeap::increase_used (size_t bytes) {
642
- Atomic::add (&_used, bytes);
641
+ Atomic::add (&_used, bytes, memory_order_relaxed );
643
642
}
644
643
645
644
void ShenandoahHeap::set_used (size_t bytes) {
646
- Atomic::release_store_fence (&_used, bytes);
645
+ Atomic::store (&_used, bytes);
647
646
}
648
647
649
648
void ShenandoahHeap::decrease_used (size_t bytes) {
650
649
assert (used () >= bytes, " never decrease heap size by more than we've left" );
651
- Atomic::sub (&_used, bytes);
650
+ Atomic::sub (&_used, bytes, memory_order_relaxed );
652
651
}
653
652
654
653
void ShenandoahHeap::increase_allocated (size_t bytes) {
655
- Atomic::add (&_bytes_allocated_since_gc_start, bytes);
654
+ Atomic::add (&_bytes_allocated_since_gc_start, bytes, memory_order_relaxed );
656
655
}
657
656
658
657
void ShenandoahHeap::notify_mutator_alloc_words (size_t words, bool waste) {
@@ -1883,11 +1882,11 @@ address ShenandoahHeap::gc_state_addr() {
1883
1882
}
1884
1883
1885
1884
size_t ShenandoahHeap::bytes_allocated_since_gc_start () {
1886
- return Atomic::load_acquire (&_bytes_allocated_since_gc_start);
1885
+ return Atomic::load (&_bytes_allocated_since_gc_start);
1887
1886
}
1888
1887
1889
1888
void ShenandoahHeap::reset_bytes_allocated_since_gc_start () {
1890
- Atomic::release_store_fence (&_bytes_allocated_since_gc_start, (size_t )0 );
1889
+ Atomic::store (&_bytes_allocated_since_gc_start, (size_t )0 );
1891
1890
}
1892
1891
1893
1892
void ShenandoahHeap::set_degenerated_gc_in_progress (bool in_progress) {
0 commit comments