src/hotspot/share/utilities/bitMap.cpp
changeset 47634 6a0c42c40cd1
parent 47616 4f26db3c02af
child 48488 51825789dd89
--- a/src/hotspot/share/utilities/bitMap.cpp	Mon Oct 16 20:22:41 2017 +0000
+++ b/src/hotspot/share/utilities/bitMap.cpp	Mon Oct 16 22:36:06 2017 -0400
@@ -628,7 +628,7 @@
       table[i] = num_set_bits(i);
     }
 
-    if (!Atomic::replace_if_null(table, &_pop_count_table)) {
+    if (Atomic::cmpxchg(table, &_pop_count_table, (BitMap::idx_t*)NULL) != NULL) {
       guarantee(_pop_count_table != NULL, "invariant");
       FREE_C_HEAP_ARRAY(idx_t, table);
     }