lidavidm commented on code in PR #34231:
URL: https://github.com/apache/arrow/pull/34231#discussion_r1111415314
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/BaseAllocator.java:
##########
@@ -233,6 +233,41 @@ private void childClosed(final BaseAllocator
childAllocator) {
listener.onChildRemoved(this, childAllocator);
}
+ @Override
+ public ArrowBuf wrapForeignAllocation(ForeignAllocation allocation) {
+ assertOpen();
+ final long size = allocation.getSize();
+ listener.onPreAllocation(size);
+ AllocationOutcome outcome = this.allocateBytes(size);
Review Comment:
As long as it's consistent. I think the behavior here is OK, and consistent
with the "allocator" actually being a "ledger".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]