src/hotspot/share/jfr/utilities/jfrAllocation.cpp
changeset 59252 623722a6aeb9
parent 58863 c16ac7a2eba4
equal deleted inserted replaced
59251:4cbfa5077d68 59252:623722a6aeb9
    39   jlong compare_value;
    39   jlong compare_value;
    40   jlong exchange_value;
    40   jlong exchange_value;
    41   do {
    41   do {
    42     compare_value = *dest;
    42     compare_value = *dest;
    43     exchange_value = compare_value + value;
    43     exchange_value = compare_value + value;
    44   } while (Atomic::cmpxchg(exchange_value, dest, compare_value) != compare_value);
    44   } while (Atomic::cmpxchg(dest, compare_value, exchange_value) != compare_value);
    45   return exchange_value;
    45   return exchange_value;
    46 }
    46 }
    47 
    47 
    48 // debug statistics
    48 // debug statistics
    49 static volatile jlong _allocated_bytes = 0;
    49 static volatile jlong _allocated_bytes = 0;