diff --git a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java index 5bd6b9fe37956..ed2184aadab16 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/Accountant.java @@ -219,6 +219,15 @@ public long getLimit() { return allocationLimit.get(); } + /** + * Return the initial reservation. + * + * @return reservation in bytes. + */ + public long getInitReservation() { + return reservation; + } + /** * Set the maximum amount of memory that can be allocated in the this Accountant before failing * an allocation. diff --git a/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java b/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java index b23a6e4bd8507..a5da50e627874 100644 --- a/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java +++ b/java/memory/src/main/java/org/apache/arrow/memory/BufferAllocator.java @@ -91,6 +91,13 @@ public interface BufferAllocator extends AutoCloseable { */ public long getLimit(); + /** + * Return the initial reservation. + * + * @return reservation in bytes. + */ + public long getInitReservation(); + /** * Set the maximum amount of memory this allocator is allowed to allocate. *