< prev index next >

src/share/vm/utilities/bitMap.cpp

Print this page
rev 13455 : [mq]: replace_if_null
rev 13457 : [mq]: fix_popc_table

@@ -615,20 +615,20 @@
     }
   }
   return true;
 }
 
-BitMap::idx_t* BitMap::_pop_count_table = NULL;
+const BitMap::idx_t* BitMap::_pop_count_table = NULL;
 
 void BitMap::init_pop_count_table() {
   if (_pop_count_table == NULL) {
     BitMap::idx_t *table = NEW_C_HEAP_ARRAY(idx_t, 256, mtInternal);
     for (uint i = 0; i < 256; i++) {
       table[i] = num_set_bits(i);
     }
 
-    if (!Atomic::conditional_store_ptr(table, &_pop_count_table)) {
+    if (!Atomic::replace_if_null(table, &_pop_count_table)) {
       guarantee(_pop_count_table != NULL, "invariant");
       FREE_C_HEAP_ARRAY(idx_t, table);
     }
   }
 }
< prev index next >