chroniclechronicle-map

Where exactly does ChronicleMap create the memory mapped file for a persisted map?


I understand ChronicleMap creates a mmap file under the hood but I'm looking through the code and getting a bit lost.

Could someone kindly show me where in the code it creates the memory mapped file? I was expecting to see something using a MappedByteBuffer or something like that but I can't see it.


Solution

  • We don't use MappedByteBuffer as this is limited to just under 2 GB at a time. Instead, we call map directly so we can map in 100 TB if we want (I have done so on Linux)

    The call is made in net.openhft.chronicle-core.OS.map(FileChannel, FileMode, long, long) in the Chronicle-Core library.