What differences are there (if any) between the regular java memory model for memory in the heap vs an mmap'd file accessed through a direct byte buffer?
Eg if I have multiple threads writing to the byte buffer, is there any special synchronization necessary to ensure that a reader thread will see all the changes?
No difference. Yes, you have to have store synchronized-with edges between writers and the reader to ensure data is written to the buffer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.