zinking commented on issue #37458:
URL: https://github.com/apache/arrow/issues/37458#issuecomment-1700898620

   actually let me put it this way 
   ```
     public BaseAllocator defaultAllocator() {
       NativeSQLMemoryConsumer consumer =
         new NativeSQLMemoryConsumer(taskMemoryManager, offHeapMemory);
       SparkAllocationListener al = new SparkAllocationListener(consumer);
       RootAllocator parent = ArrowDatasetUtil.rootAllocator();
       String name = "Spark Managed Allocator - " + UUID.randomUUID();
       return (BaseAllocator) parent.newChildAllocator(name, al, 0, 
parent.getLimit());
     }
   
     public NativeMemoryPool defaultMemoryPool() {
       NativeSQLMemoryConsumer consumer =
           new NativeSQLMemoryConsumer(taskMemoryManager, offHeapMemory);
       SparkReservationListener rl = new SparkReservationListener(consumer);
       return NativeMemoryPool.createListenable(rl);
     }
     ```
     
     should the two use the same MemoryConsumer, or the allocator doesn't use 
memoryConsumer at all? 
   here the NativeSQLMemoryConsumer is basically the same as MemoryConsumer. 
   
   @zhztheplayer 


-- 
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]

Reply via email to