protected ByteBuffer allocateByteBuffer(int size) {
        return ByteBuffer.allocate(size);
    }
Allocate a buffer.  If buffer allocation fails (e.g. because of OOM) then return the size count back to
available memory and signal the next waiter if it exists.
clients/src/main/java/org/apache/kafka/clients/producer/internals/BufferPool.java