RingBuffer.initialize

void initialize(size_t capacity) @trusted nothrow @nogc

Allocate backing storage for the ring buffer.

Uses malloc() to allocate outside GC-managed memory. Must be called once before any other method. Calling it again on an already-initialized buffer leaks the previous storage.

Parameters

capacityNumber of bytes to pre-allocate. Must be > 0.