Re: RFR: 8286715: Generalize MemorySegment::ofBuffer [v2]

2022-05-16 Thread Maurizio Cimadamore
> This patch makes MemorySegment::ofBuffer more general, by allowing clients to > pass *any* `Buffer` instance, not just `ByteBuffer`. > This allows us to match expressiveness of JNI API, where JNI clients can > obtain the address of any direct buffer instance, using the >

Re: RFR: 8286715: Generalize MemorySegment::ofBuffer

2022-05-16 Thread Jorn Vernee
On Fri, 13 May 2022 12:33:10 GMT, Maurizio Cimadamore wrote: > This patch makes MemorySegment::ofBuffer more general, by allowing clients to > pass *any* `Buffer` instance, not just `ByteBuffer`. > This allows us to match expressiveness of JNI API, where JNI clients can > obtain the address

Re: RFR: 8286715: Generalize MemorySegment::ofBuffer

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 12:33:10 GMT, Maurizio Cimadamore wrote: > This patch makes MemorySegment::ofBuffer more general, by allowing clients to > pass *any* `Buffer` instance, not just `ByteBuffer`. > This allows us to match expressiveness of JNI API, where JNI clients can > obtain the address

RFR: 8286715: Generalize MemorySegment::ofBuffer

2022-05-13 Thread Maurizio Cimadamore
This patch makes MemorySegment::ofBuffer more general, by allowing clients to pass *any* `Buffer` instance, not just `ByteBuffer`. This allows us to match expressiveness of JNI API, where JNI clients can obtain the address of any direct buffer instance, using the `GetDirectBufferAddress`