This syscall creates an anonymous file that behaves like a regular file, and so can be modified, truncated, memory-mapped, and so on, but, unlike a regular file, lives in RAM and has a volatile backing storage.
This syscall is implemented in a new "shmem" klib, which is meant to contain the implementation of all shared-memory features in the kernel. The memfd implementation relies on an underlying tmpfs filesystem, which is implemented in another new klib named "tmpfs" (which in the future can be used to create arbitrary RAM-backed filesystems and mount them at arbitrary locations in the root filesystem).
This syscall creates an anonymous file that behaves like a regular file, and so can be modified, truncated, memory-mapped, and so on, but, unlike a regular file, lives in RAM and has a volatile backing storage. This syscall is implemented in a new "shmem" klib, which is meant to contain the implementation of all shared-memory features in the kernel. The memfd implementation relies on an underlying tmpfs filesystem, which is implemented in another new klib named "tmpfs" (which in the future can be used to create arbitrary RAM-backed filesystems and mount them at arbitrary locations in the root filesystem).
Closes https://github.com/nanovms/nanos/issues/1986.