From 1053918dbd251fbff69b24ef27fa5d51c29ec2af Mon Sep 17 00:00:00 2001 From: Erik Rigtorp Date: Sun, 24 Sep 2023 22:16:41 -0500 Subject: [PATCH] Remove redundant padding As suggested by @Philippe91 in #30 --- include/rigtorp/SPSCQueue.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/rigtorp/SPSCQueue.h b/include/rigtorp/SPSCQueue.h index 3fb55fb..0693ace 100644 --- a/include/rigtorp/SPSCQueue.h +++ b/include/rigtorp/SPSCQueue.h @@ -233,9 +233,5 @@ template > class SPSCQueue { alignas(kCacheLineSize) size_t readIdxCache_ = 0; alignas(kCacheLineSize) std::atomic readIdx_ = {0}; alignas(kCacheLineSize) size_t writeIdxCache_ = 0; - - // Padding to avoid adjacent allocations to share cache line with - // writeIdxCache_ - char padding_[kCacheLineSize - sizeof(writeIdxCache_)]; }; } // namespace rigtorp