3 ms·
It seems like you are using the `MemoryAddress` object. The article says that api was removed in 20. I may be misunderstanding what you are doing though :)
by lbhdc 4y ago
It seems like you are using the `MemoryAddress` object. The article says that api was removed in 20. I may be misunderstanding what you are doing though :)
In Java 19, there was a notion named MemoryAddress used for “pointers to memory” and function
addresses. In Java 20, MemorySegment::address returns a raw memory address in the form of a
long rather than a MemoryAddress object.
- gavinray 4y agoSame difference, the "MemoryAddress" was a wrapper class around a long that pointed to the underlying address You can see that a bit further down below when ".toRawLongValue()" is called: long iovecs_ptr = fi.address().toRawLongValue() + file_info.sizeof(); liburing.io_uring_prep_readv(sqe_ptr, file_fd, MemoryAddress.ofLong(iovecs_ptr), blocks, 0); liburing.io_uring_sqe_set_data(sqe_ptr, fi.address()); int ret = liburing.io_uring_submit(ring_ptr);