Commit 51bcc7e0 authored by Marc Mutz's avatar Marc Mutz
Browse files

QFreeList: fix memory order on block deletion


Blocks are likely to have been created in a differnt thread from the one
performing their deletion, so we need an acquire fence.

The rest of the atomics use in the class looks ok, but nevertheless warrants
a deeper analysis.

Change-Id: I1571ded3a06695b0d58b5bf1d80d6283ac21f959
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 6fa34930)
No related merge requests found
Showing with 1 addition and 1 deletion
......@@ -218,7 +218,7 @@ template <typename T, typename ConstantsType>
inline QFreeList<T, ConstantsType>::~QFreeList()
{
for (int i = 0; i < ConstantsType::BlockCount; ++i)
delete [] _v[i].load();
delete [] _v[i].loadAcquire();
}
template <typename T, typename ConstantsType>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment