News for hackers. Stuff that matters.
Re:I've been writing ring buffers wrong all these years by jwatte on Wednesday December 14, 2016 @06:15PM (#13180670)
The real problem with modulo is at the end of the integer range. Add one and overflow and suddenly jump to a totally different index in the array!

BTW: read and write pointers, power of two, did that in BeOS (1998) and many sound drivers did it earlier than that. To me, that seemed like the obvious way to do it when I needed it.

There are no comments on this comment yet.