Re:Show HN: Revring, a circular buffer with zero memory waste
by jhallenworld on Thursday June 18, 2015 @08:50PM
(#9742483)
A conceptually simpler way to do this is to assign one (or more) extra bits in the head an tail pointers. For example, for a 512 entry ring, use 16-bit indices. Whenever you index the ring, and the index with 511 before performing the index.
[ Parent
| on HN ]
There are no comments on this comment yet.