enable to get the size of the buffer
simpplified resetting the ringbuffer