Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-3191

[Java] Add support for ArrowBuf to point to arbitrary memory.

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.14.0
    • Component/s: Java

      Description

      Right now ArrowBuf can only point to memory managed by an Arrow Allocator. This is because in many cases we want to be able to support hierarchical accounting of memory and the ability to transfer memory ownership between separate allocators within the same hierarchy.

      At the same time, there are definitely times where someone might want to map some amount of arbitrary off-heap memory. In these situations they should still be able to use ArrowBuf.

      I propose we have a new ArrowBuf constructor that takes an input that subclasses an interface similar to:

      public abstract class Memory  {
        protected final int length;
        protected final long address;
        protected abstract void release();
      }
      

      We then make it so all the memory transfer semantics and accounting behavior are noops for this type of memory. The target of this work will be to make sure that all the fast paths continue to be efficient but some of the other paths like transfer can include a conditional (either directly or through alternative implementations of things like ledger).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                siddteotia Siddharth Teotia
                Reporter:
                jnadeau Jacques Nadeau
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 9h 40m
                  9h 40m