A circular queue function with a main program that demonstrates its
operation is circQueue.c. Note that since you can
predict the message length in all cases you could pre-allocate buffers and
not have to pay the performance penalty of a malloc() and free() for each
buffer operation. See circQueueSimple.c for
this.