3 ms·
I was wondering about having a special message to indicate the end of the buffer while reading the article, so thanks for pre-emptively answering my question!
by kmill 7y ago
I was wondering about having a special message to indicate the end of the buffer while reading the article, so thanks for pre-emptively answering my question!
Another thing I was wondering about is using a simple buddy allocator with the ring buffer being just a list of pointers. There would be a second ring buffer to send memory back to the producer to be freed, and you would statically allocate enough memory so fragmentation doesn't affect the particular application---you know each message has a limited lifetime, for instance. (The allocator would not be shared between different ring buffers.)
Then again, I don't see any benefits to doing this.