How to get memory address from memfd_create?
问题 In my application I need to share memory between parent and child (using fork + execl ). I use memfd_create to allocate memory, because it provides a file descriptor, which may be conveniently used in child process (the discriptor is tied to stdin via dup2 before execl ) to attach to the allocated memory. I do not use write and read - I use pointers to read and write memory directly. The only piece of the puzzle which is left to solve is how to get the address of memory, allocated via fd =