Uploaded image for project: 'Apache DirectMemory'
  1. Apache DirectMemory
  2. DIRECTMEMORY-37

Update the MemoryManager API so it can be used in conjunction with NIO to provide efficient buffer management

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.1-incubating
    • None
    • None

    Description

      If MemoryManager implemented something like a ByteBuffer allocate(int size) then I could be used to directly transfer data to/from Files and Sockets without having to first copy them to a byte[].

      I'm not talking about using the ByteBuffer.allocate call. I'm talking about adding a method to MemoryManager:

      ByteBuffer bb = MemoryManager.allocate(1024*1024);
      So that I can directly modify the ByteBuffer using Channels to avoid a memory copy.. Compare this to using the MemoryManager store, update, and retrieve calls. They all force you to work with byte[]s so you end up doing a memory copies into and out of direct memory.

      This was originally reported at: https://github.com/raffaeleguidi/DirectMemory/issues/49#issuecomment-2661141

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chirino Hiram R. Chirino
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: