can I expect a lock functionality on a MemorySegment similar to mlock?

kant kodali kanth909 at gmail.com
Sun Oct 11 10:43:41 UTC 2020


Hi All,

I am implementing a buffer pool for my experimental database and ideally I
want to be able to pin a page using Java(without using JNI/JNA myself) and
by pinning a page I mean prevent a page from being swapped out or in. some
java version of mlock system call would work so I was thinking why not a
mlock like functionality on MemorySegment? If I have to resort to JNI/JNA
all the time then it makes me think Java shouldn't be the right language to
build a database like application. please let me know what you think?

Thanks,
Kant


More information about the panama-dev mailing list