Category : alignment

While reading beginner material/tutorials relevant to lock-free programming (and after doing some exercises) I found this happening. Given the following piece of code (where the only difference is pretty much using alignas(64) in struct node2 while manually "aligning" in struct node1) #include <mutex> #include <benchmark/benchmark.h> struct node1 { node1* next{ nullptr }; int value{ 0 ..

Read more