On Thu, 25 Aug 2022 19:10:19 GMT, Сергей Цыпанов <d...@openjdk.org> wrote:
>> Maybe you can modify the `read0` method to receive a width parameter >> additionally. Or we can wait for Panama and use `mmap` for this instead of >> JNI? Thanks. > >> Maybe you can modify the read0 method to receive a width parameter >> additionally. > > @merykitty sorry, I don't get it. We already have `readBytes0()` returning > array. Why do we need to add a new param to `read0`? @stsypanov `readBytes0` reads an arbitrary number of bytes and writes them to the given buffer. What I mean here is to have `read0` read 1, 2, 4 or 8 bytes then extend the result to a `jlong`, remove the need to write the result in an array. ------------- PR: https://git.openjdk.org/jdk/pull/10031