package io.grpc.okhttp; import io.grpc.internal.WritableBuffer; import io.grpc.internal.WritableBufferAllocator; import o.C15111ghZ; /* loaded from: classes6.dex */ class OkHttpWritableBufferAllocator implements WritableBufferAllocator { private static final int MAX_BUFFER = 1048576; private static final int MIN_BUFFER = 4096; @Override // io.grpc.internal.WritableBufferAllocator public WritableBuffer allocate(int i) { return new OkHttpWritableBuffer(new C15111ghZ(), Math.min(1048576, Math.max(4096, i))); } }