Are you referring to ring buffer? If so, you can simple call ring_buffer_init(...) or simple assign head to tail.
Thanks Seyhan for the response. Yes I was talking about the ring buffer.!
But the point I would know is about freeing the buffer just be reading it's values