My understanding of mmap is very limited, let me know which of the following are correct. For the following scenario in a piece of program:
1. Process starts, call mmap() // this is not actually loading anything from disk,
// just allocates memory?
2. access data in the file // this actually triggers the load from disk so
// it takes longer?
3. at this point, the process is killed and restarted
4. Process starts, call mmap() // this is not loading but the memory pointer
// allocated is likely to be different?
5. access data in the file // it takes roughly the same amount of time
// as the first time
Is my understanding correct? I am especially confused about the part after the process is killed and restarted. Thanks!