| > These are still memory mapping files using file paths ... No, they're not. The entire purpose of MAP_ANONYMOUS is to avoid using files. Sources: 1. The Linux Kernel source code [1], where it comes with the code comment: "don't use a file". 2. The glibc source code [2], where it comes with the same code comment: "Don't use a file". 3. The Linux man-pages project documentation of mmap [3], where it is documented thus: "The mapping is not backed by any file; its contents are initialized to zero. The fd argument is ignored" Similarly for SHM, but if you still don't get the point about MAP_ANONYMOUS, I doubt you'll get it for SHM either. > ... and returning file descriptors A socket is a file descriptor. An epoll handle is a file descriptor. On modern Linux kernels, a pid handle is a file descriptor. None of them are backed by "files". > ... because you have to have something coordinated between the two processes. FDs are not the only things processes can share, even if you go back to the venerable, original Unices, so I don't see what you mean. ---- [1] https://elixir.bootlin.com/linux/0.99.14r/source/include/lin... (the first version it was released in) to https://elixir.bootlin.com/linux/v5.16.1/source/include/uapi... (the latest version) [2] https://code.woboq.org/userspace/glibc/sysdeps/unix/sysv/lin... [3] https://man7.org/linux/man-pages/man2/mmap.2.html |
I'm not saying there isn't anything, I'm just seeing an extreme avoidance to an actual answer. The other guy went down a rabbit hole of syncing that memory to storage, which has nothing to do with anything.