public void deallocate(ByteBuffer buffer) {
        if (buffer != null)
            deallocate(buffer, buffer.capacity());
    }
Return buffers to the pool. If they are of the poolable size add them to the free list, otherwise just mark the
memory as free.

@param buffer The buffer to return
@param size The size of the buffer to mark as deallocated, note that this may be smaller than buffer.capacity
            since the buffer may re-allocate itself during in-place compression
clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java