-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why shall we need blocks? #6
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, I am reading the implementation of SPSC Var queue, I found that the minimum unit to store data is called block, each block is 64Bytes, which is consistent to the size of cacheline.
But for https://github.com/rigtorp/SPSCQueue, he did not use this design, he just make the data buffer region aligned with cacheline both in start and the end. But inside the buffer, data is next to each other.
This design may bring the problem of wasting space when data pushed has little size, like 4B or 8B, cause each of them would take the whole block.
Could you help to explain it? Thanks!
The text was updated successfully, but these errors were encountered: