I have a few questions regarding its implementation.
Does mmap provide a mapping of a file and return a pointer of that location in physical memory or does it return with an address of the mapping table? And does it allocate and lock space for that file too?
Once the file is stored on that location in memory, does it stay there till munmap is called?
Is the file even moved to memory or is it just a mapping table that serves as a redirection and the file is actually in the virtual memory - (disk)?
Assuming it is moved to memory, can other processes access that space to read data if they have the address?