r/programming • u/Happycodeine • Jan 04 '19
Using Java to Read Really, Really Large Files
https://medium.com/@paigen11/a6f8a3f44649
7
Upvotes
r/programming • u/Happycodeine • Jan 04 '19
View all comments
Show parent comment
1
u/gnus-migrate Jan 06 '19
Yeah it was a bit confusing when I first read it as well. Direct allocation means that the underlying memory is not managed by the JVM(i.e. allocated using malloc or whatever).
Best effort means that just because you directly allocate the buffer doesn't mean no copying will happen. Some operating systems might not have the needed support for zero copying so don't expect the same performance across JVMs or across different operating systems using the same JVM. You need to check the documentation of the specific JVM you are using to see whether the APIs you are using will result in copies on the OS you are using.
I don't know what you mean by systems programming but Java is used for high performance use cases, even though you're never going to write an operating system in Java for example.