if I want mmap to create a 10 GB file and immediately load the whole file into physical memory, how can I do this?
I do not want to use a function like mlock because it needs root privileges.
Is there a system call that can satisfy my requirement?
(I have more than enough memory.)
source share