From 84ac360445004127c3869ad8a0f0e292030be4f6 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Fri, 17 Dec 2021 12:12:32 +0000 Subject: [PATCH] Make MPSCQ invariant thread-safe --- src/mem/remoteallocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/remoteallocator.h b/src/mem/remoteallocator.h index b9b1ff6..3c060e6 100644 --- a/src/mem/remoteallocator.h +++ b/src/mem/remoteallocator.h @@ -63,7 +63,6 @@ namespace snmalloc void invariant() { SNMALLOC_ASSERT(back != nullptr); - SNMALLOC_ASSERT(front != nullptr); } void init(freelist::HeadPtr stub) @@ -140,6 +139,7 @@ namespace snmalloc Cb cb) { invariant(); + SNMALLOC_ASSERT(front != nullptr); // Use back to bound, so we don't handle new entries. auto b = back.load(std::memory_order_relaxed);