< prev index next >
src/share/vm/gc/g1/sparsePRT.cpp
Print this page
rev 10742 : Make fields used in lock-free algorithms volatile
@@ -278,11 +278,11 @@
capacity() * (SparsePRTEntry::size() + sizeof(int));
}
// ----------------------------------------------------------------------
-SparsePRT* SparsePRT::_head_expanded_list = NULL;
+SparsePRT* volatile SparsePRT::_head_expanded_list = NULL;
void SparsePRT::add_to_expanded_list(SparsePRT* sprt) {
// We could expand multiple times in a pause -- only put on list once.
if (sprt->expanded()) return;
sprt->set_expanded(true);
< prev index next >