src/hotspot/share/utilities/bitMap.cpp
changeset 48488 51825789dd89
parent 47634 6a0c42c40cd1
child 49828 ee3555b4a130
--- a/src/hotspot/share/utilities/bitMap.cpp	Wed Jan 03 17:29:20 2018 +0000
+++ b/src/hotspot/share/utilities/bitMap.cpp	Thu Jan 04 18:18:18 2018 -0500
@@ -628,7 +628,7 @@
       table[i] = num_set_bits(i);
     }
 
-    if (Atomic::cmpxchg(table, &_pop_count_table, (BitMap::idx_t*)NULL) != NULL) {
+    if (!Atomic::replace_if_null(table, &_pop_count_table)) {
       guarantee(_pop_count_table != NULL, "invariant");
       FREE_C_HEAP_ARRAY(idx_t, table);
     }