summaryrefslogtreecommitdiffstats
path: root/include/shard
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2024-02-08 13:13:33 -0500
committerDouglas Rumbaugh <dbr4@psu.edu>2024-02-08 13:13:33 -0500
commited724dc3c380df36d8198ad27a63bf392c077ea7 (patch)
treeadc5608a1b374ab9d2b8888e199a6495b5d66839 /include/shard
parent0f18dd8be6b20ebb8b6e5904032cc7ead305e88c (diff)
downloaddynamic-extension-ed724dc3c380df36d8198ad27a63bf392c077ea7.tar.gz
ISAMTree: added comment explaining the compiler fence
Diffstat (limited to 'include/shard')
-rw-r--r--include/shard/ISAMTree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/shard/ISAMTree.h b/include/shard/ISAMTree.h
index b52887a..9458b1f 100644
--- a/include/shard/ISAMTree.h
+++ b/include/shard/ISAMTree.h
@@ -65,6 +65,10 @@ public:
sizeof(Wrapped<R>),
(byte**) &m_data);
+ /*
+ * without this, gcc seems to hoist the building of the array
+ * _above_ its allocation under -O3, resulting in memfaults.
+ */
asm volatile ("" ::: "memory");
auto res = sorted_array_from_bufferview(std::move(buffer), m_data, m_bf);