2525public interface BufferAllocator extends AutoCloseable {
2626
2727 /**
28- * Allocate a new or reused buffer of the provided size. Note that the buffer may technically be
29- * larger than the requested size for rounding purposes. However, the buffer's capacity will be
30- * set to the configured size.
28+ * Allocate a new or reused buffer of the provided size. The buffer may be larger than the
29+ * requested size for rounding purposes (e.g. to a power of two), and the buffer's capacity will
30+ * reflect the actual allocated size. Use {@link ArrowBuf#capacity(long)} to set the capacity to
31+ * the requested size if needed.
3132 *
3233 * @param size The size in bytes.
3334 * @return a new ArrowBuf, or null if the request can't be satisfied
@@ -36,9 +37,10 @@ public interface BufferAllocator extends AutoCloseable {
3637 ArrowBuf buffer (long size );
3738
3839 /**
39- * Allocate a new or reused buffer of the provided size. Note that the buffer may technically be
40- * larger than the requested size for rounding purposes. However, the buffer's capacity will be
41- * set to the configured size.
40+ * Allocate a new or reused buffer of the provided size. The buffer may be larger than the
41+ * requested size for rounding purposes (e.g. to a power of two), and the buffer's capacity will
42+ * reflect the actual allocated size. Use {@link ArrowBuf#capacity(long)} to set the capacity to
43+ * the requested size if needed.
4244 *
4345 * @param size The size in bytes.
4446 * @param manager A buffer manager to manage reallocation.
0 commit comments