jacereda / fsatrace

Filesystem access tracer
ISC License
81 stars 12 forks source link

Use memfd_create() to create shared memory region on Linux. #45

Open digit-google opened 2 years ago

digit-google commented 2 years ago

These Linux-specific memory regions are significantly better than /dev/shm ones since they are automatically reclaimed when all file descriptors pointing to them are closed. Moreover, they do not have a real filesystem name, so they cannot conflicts when multiple commands with the same key are launched.

For context, see this bug entry for the Fuchsia build which is experiencing fsatrace-related issues:

https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=95360