use RingBuffer.get() instead of deprecated getAllocated() method