Open
Description
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!
Metadata
Metadata
Assignees
Labels
No labels