4 ms·
> Java memory mapping having insane issues on every platform I'm very interested, what issues? I've occasionally considered using mmap for a few things, but ne
by kjeetgill 4y ago
> Java memory mapping having insane issues on every platform
I'm very interested, what issues? I've occasionally considered using mmap for a few things, but never had justification to. I'm curious what issues I might have run into.
Did you use JNI/JNA to mmap or via RandomAccessFile?
- RyanHamilton 4y ago2GB limit. Cost of indirect addressing. Inability to address RAM and disk using same method calls without overhead. I've implemented a modest database in both C and Java with memory mapping. It's hard to explain the feeling of programming both but in general: with java I found myself trying to add intelligence at the cost of complexity to make things run faster. In C I could get speed by removing overheads and doing less work.
- kjeetgill 4y agoThanks! Insightful. I wonder if you could get what you needed via unsafe but I agree: that's fighting the system in Java.