@Override
    final boolean offerColdPath(E[] buffer, long mask, long pIndex, long offset, E v, Supplier<? extends E> s) {
        // use a fixed lookahead step based on buffer capacity
        final long lookAheadStep = (mask + 1) / 4;
        long pBufferLimit = pIndex + lookAheadStep;
        // go around the buffer or add a new buffer
        if (null == lvRefElement(buffer, calcCircularRefElementOffset(pBufferLimit, mask))) {
            // joy, there's plenty of room
            producerBufferLimit = pBufferLimit - 1;
            writeToQueue(buffer, v == null ? s.get() : v, pIndex, offset);
        } else if (null == lvRefElement(buffer, calcCircularRefElementOffset(pIndex + 1, mask))) {
            // buffer is not full
            writeToQueue(buffer, v == null ? s.get() : v, pIndex, offset);
        } else {
            // we got one slot left to write into, and we are not full. Need to link new buffer.
            // allocate new buffer of same length
            final E[] newBuffer = allocateRefArray((int) (mask + 2));
            producerBuffer = newBuffer;
            producerBufferLimit = pIndex + mask - 1;
            linkOldToNew(pIndex, buffer, offset, newBuffer, offset, v == null ? s.get() : v);
        }
        return true;
    }
NOTE: This class was automatically generated by org.jctools.queues.unpadded.JavaParsingUnpaddedQueueGenerator
which can found in the jctools-build module. The original source file is SpscUnboundedArrayQueue.java.

An SPSC array queue which starts at <i>initialCapacity</i> and grows indefinitely in linked chunks of the initial size.
The queue grows only when the current chunk is full and elements are not copied on
resize, instead a link to the new chunk is stored in the old chunk for the consumer to follow.<br>

@param <E>
jctools-core/src/main/java/org/jctools/queues/unpadded/SpscUnboundedUnpaddedArrayQueue.java