The memory remains: Permanent memory with systemd and a Rust allocator
We are going to stitch three things together to make Rust objects that survive program restart. The memory backing the object will continue existing while the program restarts.
Systemd’s File Descriptor Store (systemd 254+) allows us to give any file descriptor to systemd, and later ask for it back. The file stays open when we systemctl restart <prog>. Yes this is similar to socket activation.
The memfd_create syscall (Linux 3.17+) creates an anonymous file that only exists in memory, and only a...
Read more at darkcoding.net