Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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
- is part of
-
DIRECTMEMORY-69 Expose InputStream and OutputStream Interfaces instead of internal Pointer.directBuffer
- Resolved