ringbuffrar
A ring buffer, also known as a circular buffer, is a fixed-size buffer that is treated as if it were connected end-to-end. It's a data structure that uses a single, fixed-size block of memory. When the buffer is full, new data overwrites the oldest data. This behavior makes it useful for applications where data is continuously streamed, such as in audio or video processing, or for implementing producer-consumer scenarios where producers add data and consumers remove it.
The core idea of a ring buffer involves two pointers: a read pointer and a write pointer.
Ring buffers offer efficient memory usage because they don't require memory reallocation when data is added