Specify memory ordering
This commit is contained in:
1 parent
327489be04
commit
c607f77b3b
1 file changed
+3
-3
+3
-3
@@ -303,21 +303,21 @@ int main() {
|
||||
auto x = mm.allocate();
|
||||
mm.base[x].pointers[0] = 0;
|
||||
mm.base[x].pointers[1] = 0;
|
||||
mm.base[x].updated.store(false);
|
||||
mm.base[x].updated.store(false, std::memory_order_relaxed);
|
||||
});
|
||||
mm.gc(nullptr, 0, 0);
|
||||
for (int i = 0; i < 10000; ++i) {
|
||||
auto x = mm.allocate();
|
||||
mm.base[x].pointers[0] = 0;
|
||||
mm.base[x].pointers[1] = 0;
|
||||
mm.base[x].updated.store(false);
|
||||
mm.base[x].updated.store(false, std::memory_order_relaxed);
|
||||
}
|
||||
auto root = mm.allocate();
|
||||
mm.base[root].entry = weaselab::Entry::make(0, nullptr, 0, nullptr, 0,
|
||||
weaselab::VersionedMap::Set);
|
||||
mm.base[root].pointers[0] = 0;
|
||||
mm.base[root].pointers[1] = 0;
|
||||
mm.base[root].updated.store(false);
|
||||
mm.base[root].updated.store(false, std::memory_order_relaxed);
|
||||
bench.run("gc", [&]() { mm.gc(&root, 1, 0); });
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user