A circular buffer alternative written in C under a BSD license