You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a circular buffer
implementation using mmap to ease the logic behind the caller which
needs to know if the polled item crosses the maximum size of the
underlying array.
For more information, please refer to my note at HackMD.
Internals
mmap is used to mirror the buffer like the following:
the "mirrored" buffer is then placed beside the buffer.
When the user polls the item it doesn't matter if the item crosses the buffer's boundary:
About
Circular Buffer implementation with mmap(2) *incomplete*