Andrey Mashenkov created IGNITE-14512:
-----------------------------------------

             Summary: General purpose DirectMemoryRegion.
                 Key: IGNITE-14512
                 URL: https://issues.apache.org/jira/browse/IGNITE-14512
             Project: Ignite
          Issue Type: Improvement
            Reporter: Andrey Mashenkov


h3. Motivation.
Now Ignite 2 have a number of place of direct Unsafe class usage.
We already ported DirectBuffer for streams/connections and going to port a 
PageMemory to Ignite 3.
Rewriting Unsafe to VarHandles looks impossible for most of the cases
I've no idea why there is VarHandle wrapper e.g. for direct LongBuffer, but 
there is no way to get DirectBB with CAS operation in Java. 

h3. Description.
Let's localize and restrict direct Unsafe class usage to few classes in a 
single module.
* Design MemorySegment API with random offset access using Unsafe.
* Multiple implementation for Big-Endian and Little-Endian cases.
* Align-aware wrapper or implementation (non-volatile operations only). 
For systems that has limited non-aligned access.
* Add CAS operations support (only aligned)
* Add adapter to access memory segment slice() via ByteBuffer interface. 
Then replace DirectBuffer in network module.
And port PageMemory regarding the  new concept.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to